User Guide
Performance and Flash Player 117
If you must restyle your components, you can improve efficiency in your application by using the
Loader component. If you want to implement several styles in different components, you can
place each component in its own SWF file. If you change styles on the Loader component and
reload the SWF file, the components in the SWF file are recreated. When the component is
recreated, the cache of styles is emptied, and the style for the component is reset and referenced
again.
Note: If you want to apply a single style to all instances of a component in your SWF file, change the
style globally using _global.styles.ComponentName.
Publishing with components
When you are planning to publish a SWF file with backward compatibility, you must have a good
understanding of which components have that capability. For information about component
availability in different versions of Flash Player, see the following table:
* Deselect the Optimize for Flash Player 6r65 option in Publish Settings for these components to
work.
Preloading components and classes
This section describes some of the methodologies for preloading and exporting components and
classes in Flash MX 2004. Preloading involves loading some of the data for a SWF file before the
user starts interacting with it. Flash imports classes on the first frame of a SWF file when you use
external classes, and this data is the first element to load into a SWF file. It is similar for the
component classes, because the framework for components also loads into the first frame of a
SWF file. When you build large applications, the loading time can be lengthy when you must
import data, so you must deal with this data intelligently, as the following procedures show.
Because the classes are the first data to load, you might have problems creating a progress bar or
loading animation if the classes load before the progress bar, because you probably want the
progress bar to reflect the loading progress of all data (including classes). Therefore, you want to
load the classes after other parts of the SWF file, but before you use components.
To select a different frame for the classes to load into a SWF file:
1.
Select File > Publish Settings.
2.
Select the Flash tab, and click the Settings button.
3.
In the Export frame for classes text box, type the number of a new frame to determine when to
load the classes.
4.
Click OK.
Flash Player 6
(6.0.65.0) and earlier
Flash Player 6
(6.0.65.0)
Flash Player 7 and
later
ActionScript 2.0 Supported Supported Supported
V2 UI component set Not supported* Supported Supported
Media components Not supported Not supported Supported
Data components Not supported Not supported Supported