View comments | RSS feed

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:
  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 later. 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 showing 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 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 does not appear in the Output panel.

    For more information, see "Using the Output panel" in Using ActionScript in Flash.

    Protect from Import prevents others from importing a SWF file and converting it back into a 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 Chapter 4, "Writing and Debugging Scripts" in Using ActionScript in Flash.

  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 finish.

    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 does not play until it downloads 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 might 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 more 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 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" in Using ActionScript in Flash.

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:

Comments


_tippedOver said on Feb 10, 2005 at 2:43 PM :
Is there a way to manually override the "Export frame for classes"? I'd like to make my preloader a class and have just that one class export on frame 1 while all the other classes export on frame 5.
No screen name said on Apr 12, 2005 at 11:25 PM :
In Flash publish settings - there is an option to set jpeg quality. I
cannot get this to work. Is there a way to do this without altering the
properties of every bitmap in the library?
_Maulik said on Sep 21, 2005 at 4:55 AM :
I changed default frame 1 for exporting classes to frame 2 but it is not working at all... Seems to be a bug

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/mx2004/main_7_2/00000483.html