Scripting Guide

 This guide provides helpful information about scripting in AS3, AS2, and JS in your FlaExporter content.


If you're new to FlaExporter go here first to learn the basics.

 Go here to send us feedback or report issues.

http://www.fla-exporter.com/feedback

FlaExporter Allows Scripting in ActionScript or JavaScript

FlaExporter allows you to use ActionScript 3.0, ActionScript 2.0 or JavaScript directly on your FLA timelines to create HTML5 content.  If you prefer ActionScript you can simply code as you normally would in Flash.  If you prefer JavaScript you can use familiar ActionScript APIs in the JavaScript language.   Under the hood FlaExporter converts ActionScript to JavaScript while JavaScript code will be used directly without modification.


Click the links below to explore the guides for AS 3.0, AS 2.0, or JavaScript.

Debugging

The FlaExporter Preview Window will give you a helpful message if ActionScript or JS code has a problem.


Use trace or console.log to send output to the browser's console output

Here's an example--

trace("foo is "+foo);


Use the name property to determine which symbols are being referenced in the display hierarchy.

Here's an example--

trace("My MovieClip is "+myMC.name);





Supported Versions of Flash/Animate for AS2

  • Recent versions of Flash/Animate don't fully support AS2
  • FlaExporter only fully supports AS2 for Flash CS6 (Win)
  • To update AS2 FLAs to work in modern versions of  Adobe Flash/Animate follow the steps below. 

Updating AS2 FLAs for modern Flash/Animate

The main problem with AS2 in recent versions of Adobe Flash and Animate is that ActionScript placed on instances will be removed.  The solution is simply to open the FLA file in an older version of Flash CS6 or below and move the AS2 code from instances to timelines instead.


Here's an example of some AS2 code on an instance named click_btn


on (release) {

    getURL(_root.clickTAG, '_blank');

}

To fix this add the following code to the parent timeline of click_btn--

click_btn.onRelease = function(){

    getURL(_root.clickTAG, '_blank');

}

What's Next

Go here to learn more about working with FlaExporter--

http://www.fla-exporter.com/learn


Follow us on Twitter

@FlaExporter

Fla Exporter © 2016