How classes are compiled and exported

By default, classes used by a SWF file are packaged and exported on the SWF's first frame. You can also specify the frame where your classes are packaged and exported. This is useful, for example, if a SWF file uses many classes that require a long time to download. If the classes are exported on the first frame, the user would have to wait until all the class code has downloaded before that frame would appear. By specifying a later frame in the Timeline, you could display a short loading animation in the first few frames of the Timeline while the class code in the later frame downloads.

To specify the export frame for classes for a Flash document:

  1. With a FLA file open, select File > Publish Settings.
  2. In the Publish Settings dialog box, click the Flash tab.
  3. Click the Settings button next to the ActionScript version pop-up menu to open the ActionScript Settings dialog box.
  4. In the Export Frame for Classes text box, enter the number of the frame where you want to export your class code.

    If the frame specified does not exist in the Timeline, you will get an error message when you publish your SWF.

  5. Click OK to close the ActionScript Settings dialog box, then click OK to close the Publish Settings dialog box.