ActionScript compilation

The logic of your Flex application can consist of ActionScript classes, MXML files, SWF files, and external components in the form of SWC components, MXML files, or ActionScript files. The end result of all the input files is a SWF file that is downloaded by Flash Player and played on the client's machine.

You can use ActionScript in code fragments within your MXML files. The Flex compiler transforms the main MXML file and its child files into a single ActionScript class. As a result, you cannot define classes or use statements outside of functions in MXML files and included ActionScript files.

You can reference imported ActionScript classes from your MXML application files, and those classes are added to the final SWF file.

When the transformation to an ActionScript file is complete, Flex links all the ActionScript components and includes those classes in the final SWF file.

The following figure shows the source files used to generate a SWF file that your J2EE server sends to the client:


Source files generate a SWF file that the J2EE server sends to the client.


Version 1.5

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flex/15/flex_docs_en/00000045.htm