
About ActionScript
45
•
Create new components in ActionScript.
•
Create new components in the Flash authoring environment (SWC files).
Flex ActionScript packages
Flex includes a standard set of ActionScript classes and packages that define the Flex components
and provide helper classes. These packages are in the Flex application WAR file under
flex_app_root
/WEB-INF/flex/system_classes. These packages are available to all Flex applications
and do not require explicit import statements.
In addition, Flex includes a SWC file in the
flex_app_root
/WEB-INF/flex/frameworks directory
that provides all the necessary symbols for Flex components. A debug version of this SWC file is
located in the
flex_app_root
/WEB-INF/flex/frameworks_debug directory.
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.
Содержание FLEX-GETTING STARTED WITH FLEX
Страница 1: ...Getting Started with Flex...
Страница 4: ...4 Contents...
Страница 22: ...22 Chapter 1 Introducing Flex...