Setting publish options for the Flash SWF file format

When publishing a Flash document, you can set image and sound compression options, and an option to protect your SWF file from being imported. You use the controls in the Flash panel of the Publish Settings dialog box to change the settings.

To set publish options for a Flash document:

  1. Open the Publish Settings dialog box. Do one of the following:
    • Select File > Publish Settings.
    • In the Property inspector for the document (which is available when no object is selected), click the Settings button.

    Note: To create a publish profile for the publish settings that you'll specify, see Using publish profiles.

  2. Click the Flash tab and select a Player version from the Version pop-up menu.

    Not all Macromedia Flash MX 2004 and Macromedia Flash MX Professional 2004 features work in published SWF files that target Flash Player versions earlier than Flash Player 7.

    If you want to specific Flash Player detection, on the HTML tab of the Publish Settings dialog box, you must select Flash Player 4 or a later version. For more information about Flash Player detection, see Configuring publish settings for Flash Player detection.

  3. Select a load order to specify how Flash loads a SWF file's layers for displaying the first frame of your SWF file: Bottom Up or Top Down.

    This option controls which parts of the SWF file Flash draws first over a slow network or modem connection.

  4. In the ActionScript Version pop-up menu, select either ActionScript 1.0 or 2.0 to reflect the version used in your document.

    If you select ActionScript 2.0 and you've created classes, you can click the Settings button to set the relative classpath to class files that differs from the path to default directories set in Preferences. For more information, see Setting the classpath.

  5. To enable debugging of the published Flash SWF file, select any of the following options:

    Generate Size Report generates a report listing the amount of data in the final Flash content by file.

    Omit Trace Actions causes Flash to ignore Trace actions (trace) in the current SWF file. When you select this option, information from Trace actions is not displayed in the Output panel.

    For more information, see Using the Output panel.

    Protect from Import prevents others from importing a SWF file and converting it back into a Flash (FLA) document. If you select this option, you can decide to use password protection with your Flash SWF file.

    Debugging Permitted activates the Debugger and allows remote debugging of a Flash SWF file. If you select this option, you can decide to use password protection with your SWF file.

    Compress movie compresses the SWF file to reduce file size and download time. This option is selected by default and is most beneficial when a file is text-intensive or includes a lot of ActionScript. A compressed file plays only in Flash Player 6 or later.

    Optimize for Flash Player 6 r65 If you selected Flash Player 6 in the Version pop-up menu, you can select this option to target a release of Flash Player 6. The updated version uses ActionScript register allocation to improve performance. Users must have the same release of Flash Player 6 or later.

  6. If you selected either Debugging Permitted or Protect from Import in step 5, you can enter a password in the Password text box. If you add a password, others must enter the password before they can debug or import the SWF file. To remove the password, clear the Password text box.

    For more information on the Debugger, see Writing and Debugging Scripts.

  7. To control bitmap compression, adjust the JPEG Quality slider or enter a value.

    Lower image quality produces smaller files; higher image quality produces larger files. Try different settings to determine the best trade-off between size and quality; 100 provides the highest quality and least compression.

  8. To set the sample rate and compression for all streaming sounds or event sounds in the SWF file, click the Set button next to Audio Stream or Audio Event and select options for Compression, Bit Rate, and Quality in the Sound Settings dialog box. Click OK when you are finished.

    Note: A streaming sound plays as soon as enough data for the first few frames downloads; it is synchronized to the Timeline. An event sound is not played until it is downloaded completely, and it continues to play until explicitly stopped.

    For more information on sound, see Working with Sound.

  9. If you want to use the settings selected in step 8 to override settings for individual sounds selected in the Sound section of the Property inspector, select Override Sound Settings. You may want to select this option to create a smaller low-fidelity version of a SWF file.

    Note: If the Select Override Sound Settings option is deselected, Flash scans all stream sounds in the document (including sounds in imported video) and publishes all stream sounds at the highest individual setting. This can increase file size, if one or more stream sounds has a high export setting.

  10. (Flash Professional only) To export sounds suitable for devices, including mobile devices, instead of the original library sound, select Export Device Sounds. For additional information, see Using sounds in Flash documents for mobile devices (Flash Professional only). To save the settings with the current file, click OK.

Setting the classpath

To use an ActionScript class that you've defined, Flash must be able to locate the external ActionScript 2.0 files that contain the class definition. The list of folders in which Flash searches for class definitions is called the classpath. Classpaths exist at the global/application level, and at the document level. For more information about classpaths, see Understanding the classpath.

To modify the document-level classpath:

  1. Select File > Publish Settings to open the Publish Settings dialog box.
  2. Click the Flash tab.
  3. Verify that ActionScript 2.0 is selected in the ActionScript Version pop-up menu and click Settings.
  4. In the ActionScript Settings dialog box, specify the frame on which the class definition should reside in the Export Frame for classes text box.
  5. Do any of the following:
    • To add a folder to the classpath, click the Browse to Path button, browse to the folder you want to add, and click OK.

      Alternatively, click the Add New Path (+) button to add a new line to the Classpath list. Double-click the new line, type a relative or absolute path, and click OK.

    • To edit an existing classpath folder, select the path in the Classpath list, click the Browse to Path button, browse to the folder you want to add, and click OK.

      Alternatively, double-click the path in the Classpath list, type the desired path, and click OK.

    • To delete a folder from the classpath, select the path in the Classpath list and click the Remove from Path button.