3D Animator

Creating HTML5 Advertisements with 3d animator CC: Embed JavaScript into HTML

We’re back with this series highlighting the best Animate CC features for creating HTML5 advertisements. Just in case you skipped it, take a look at our first publish on HTML5 Canvas templates.

Some ad-serving vendors require that all your local JavaScript be incorporated inside the HTML file as opposed to a separate JavaScript file. This format requirement may exist due to platform compatibility issues or limitations on the amount of files and server demands needed to aid your ad experience. Whatever the reasons, this spec can differ broadly from vendor to vendor which means you ought to look at your vendor’s documentation before finalizing and packaging your assets. In case your vendor requires you to definitely combine the local JavaScript and HTML, you’re in luck because to be able to facilitate a simple and integrated method of consolidating both of these files, Animate CC now introduces the capacity to instantly embed the code in the FLA’s JavaScript file inside the HTML file during posting. To allow this selection:

3D Animator

3D Animator

Within the File > Publish Configurations menu, change to the Advanced tab and choose the Include JavaScript In HTML

Select OK after being alerted that when opting to incorporate JavaScript within the HTML file, 3d animator will overwrite the HTML each time the file is republished. This feature disables the Overwrite HTML file on publishcheck box, and through any posting event, the HTML is going to be overwritten.

Republish any project to improve your files.

To be able to revert towards the default behavior of outputting the JavaScript to some separate file, simply select Stop including JavaScript in HTML, after which select Publish so as stop mixing the JavaScript and HTML files.

Take note that whenever the Overwrite HTML file on publish isn’t selected, the Include JavaScript In HTML choice is instantly disabled.