User Guide

Using a preloader with components 61
To change the export frame for all your classes:
1. Select File > Publish Settings.
2. In the Flash tab of the Publish Settings dialog box, make sure the ActionScript version is
set to ActionScript 2.0.
3. Click the Settings button to the right of the ActionScript version.
4. In ActionScript 2.0 Settings, change the number for the Export Frame for Classes text box
to the frame where your components first appear.
You cannot use any classes until the playhead reaches the frame you choose to load them into.
Because components require classes for their functionality, you must load components after
the frame specified for loading classes. If you export your classes to Frame 3, you cannot use
anything from those classes until the playhead reaches Frame 3 and loads the data.
If you want to preload a file that uses components, you must also preload the components in
the SWF file. To accomplish this, you must set your components to export for a different
frame in the SWF file.
To change the frame into which components are exported:
1. Select Window > Library to open the Library panel.
2. Right-click (Windows) or Control-click (Macintosh) the component in the library.
3. Select Linkage from the context menu.
4. Deselect Export in First Frame.
5. Click OK.
6. Select File > Publish Settings.
7. Select the Flash tab and click the Settings button.
8. Enter a number into the Export Frame for Classes text box and click OK. The classes will
load into this frame.
9. Click OK to close the Publish Settings dialog box.
If components do not load on the first frame, you can create a custom progress bar for the first
frame of the SWF file. Do not reference any components in your ActionScript or include any
components on the Stage until you load the classes for the frame you specified in Step 7.
NOTE
Components must be exported after the ActionScript classes that they use.