building a slideshow with flash
Exporting your Flash SWF file
In order to include your Flash project in a web page, the first step is to export your project from Flash as a ".swf" file, (pronounced "swif"). Remember, Flash uses ".fla" file extension for the files that you actually build in Flash, while SWF is the file format that is exported from Flash and ultimately embedded on a web page. The SWF file is a locked file, and cannot be used to edit a Flash project.
Exporting SWF from Flash
To export your SWF from Flash, pull down the File menu and select publish settings. These are the settings for the file you are about to export. At the top of the publish settings window are three tabs: Formats, Flash and HTML.
The Formats Tab
Under the Formats tab, there are a series of check boxes that specify what files will be published when you click the publish button. Generally, you always want to export a SWF file, but you also have the option to export an ".html" web page file as well. The HTML button is selected by default, and with both of these selected, Flash will automatically build a plain HTML web page file with your Flash project (SWF) embedded on the page when you click Publish.
The Flash Tab
In the Flash tab, there are various settings related to how Flash will export your SWF file.
- Version: The version is an important setting. This will determine the version of Flash the user must have in order to view your project. See the latest penetration statistics to find out how many people are using a particular version of Flash.
- Load Order: This will determine which layers Flash loads first. This usually is only apparent to users with very slow connections. The default is bottom first, so that elements like buttons are loaded before the ActionScript (which is traditionally on the top layer).
- ActionScript Version: Specifies the version of ActionScript you have used in your project.
- Generate size report: This will generate a report displaying the amount of data your in your exported SWF file.
- Protect from import: This further locks your SWF and helps to prevent others from easily converting your SWF back into an FLA document using a password. However, this is not 100% secure, and there are a host of third-party programs that have cracked this security. Use this only as a deterrent if the code or copyright is important to encrypt.
- Omit trace actions: Trace code in your ActionScript will be ignored if this is selected. Usually this only appears when viewing SWFs from Flash.
- Permit debugging: Allows you to debug your SWF file using the built-in Flash debugger, even after you have published your SWF to the Web. Also allows you to password protect your SWF.
- Compress movie: Compresses the SWF file to a smaller filesize. Mostly this is beneficial for text or ActionScript-intensive projects.
- Optimize for Flash Player 6: (off by default) If you've selected Flash Player 6 as the version, this further specifies which release version of Flash Player 6 to use. Check to include optimizations that were updated in Flash Player 6 that allowed improved performance.
- Export hidden layers: This exports all hidden layers in a Flash document (selected by default). If this is not selected, Flash will not export any layers that are marked as hidden in Flash (even ones that are inside MovieClips). This could be used as a tool to aid in testing different versions by marking some layers visible.
- Export SWC: This will export a .swc file which is used in distributing components.
- JPEG quality: Slider that will determine the quality of jpeg images in your project.
- Audio Stream: Set the quality (sample rate and compression) for stream sounds in the SWF file (only if the Override Sound Settings checkbox is selected.) Streaming sounds load progressively and are synced with the timeline.
- Audio Event: Set the quality of event sounds. Event sounds do not play until loaded completely, and play independently from the timeline.
- Override sound settings: If checked, compression settings made to individual files is overridden by the setting here. If not checked, Flash will look at all individual settings, and use the highest quality compression it finds and apply it to all stream sounds in the SWF.
- Export device sounds: Select this to export sounds suitable for devices like mobile devices.
- Local playback security: Allows published SWF files local security access, and allows the SWF to access local files or over a network if played locally.
The HTML tab
This tab displays the settings for the HTML file that is published, when the export HTML option is selected.
- Template: This determines the HTML template to be used when exporting. You can create your own templates or used the built-in Flash Only template.
- Dimensions: The dimensions of the Flash projects when embedded in the Web page.
- Paused at start: Prevents the SWF from playing until an ActionScript starts the timeline.
- Display Menu: Shows a menu when users right-click (PC) or control-click (MAC).
- Loop: Repeats the timeline when the SWF reaches the end. This is the default behavior.
- Device Font: Will substitute anti-aliased system fonts for fonts not installed on the user's computer (only with Windows). Selecting this will make smaller fonts clearer on Windows computers, but could vary from PC and Mac computers.
- Quality: Determine the trade off between playback speed and appearance.
- Window Mode: Specify the relationship of the bounding box Flash is embedded in, and the rest of the HTML page. Window and Opaque Windowless are both opaque, but Window uses the HTML background color, while Opaque Windowless lets HTML content render above the Flash content. Transparent Windowless sets the background of Flash to transparent allowing HTML content to appear above and below the content.
- Alignment: Sets the alignment of the Flash project as it is embedded in the page.
- Scale: Specifies the boundaries of the Flash project, and how it relates to the rest of the HTML page.
- Flash alignment: If the embedded Flash content is cropped, this setting will specify from what sides the cropping will occur.