Preview and publish

Using Flash Catalyst CS5, you can preview your projects in a web browser as you work, and publish your final interactive projects as SWF or AIR files. By default, Flash Catalyst generates two versions of a project. One version includes the necessary files to run the project as a web application, but cannot run locally. A second version can run locally, but cannot be run from a web server or launch URLs. There is also an option to build an Adobe AIR application.

  • The Run Local version is a larger SWF file with its assets included and no dependencies. The purpose of this version is to share it. For example, you can share the file with a client and they have everything to run the SWF file locally.

  • The Deploy To Web version produces a smaller SWF file, along with the Flex 4 framework files externalized.

    Note: Since Flash Player 9, the Flex framework is cached. Anyone using Flash Player 9 with the Flex framework, can download the smaller Deploy To Web SWF file from your web server. To support all other users, it is a best practice to put the Flex framework files on the web server next to the SWF file.

Previewing your project in a web browser

It is a best practice to view your work frequently in a web browser before publishing a final version. This allows you to more efficiently check for accuracy and real-world performance.

 Choose File > Run Project.

Flash Catalyst launches the project in your default browser.

Preview your project in a web browser by choosing File > Run Project.

Select publish options and publish a project

  1. Save the project and choose File > Publish To SWF/AIR.

    The Build For Accessibility, Build Version For Upload To A Web Server and Build Version To View Offline options are selected by default. The version for upload to a web server can run from a web server. The version to view offline can run on a local system.

    Publish To SWF dialog box
  2. Select a folder in which to save the project files.

  3. To create an Adobe AIR application, select the Build AIR Application check box (optional).

  4. To embed fonts in the SWF content, select the Embed Fonts check box (optional). If your project does not include fonts that you can embed, the option to embed is disabled.

    Embed any fonts other than Arial, Courier New, Georgia, Times New Roman, Verdana. Embedding non-web fonts ensures that users see the design exactly as you do, even if they don't have the same fonts installed. Click the Advanced button to open the Font Embedding dialog box. You can specify which fonts and character ranges to embed. Limiting what you choose to embed can help reduce the size of your published SWF file.
  5. Click Publish.

    Inside the folder you specify, Flash Catalyst creates a subfolder with the same name as your project. Inside this folder, Flash Catalyst publishes a separate folder and files for each version of the project you chose to publish. To deploy your published project to the web, upload the entire contents of the deploy-to-web folder to your web server. You can rename the deploy-to-web folder.

    The published files include the main.html wrapper for the SWF file. This file references the swfobject.js code that performs Flash Player version checks and redirects to upgrade Flash Player. You can reuse this code in your HTML files.
View full size graphic
Font Embedding dialog box

Optimize application performance

To optimize your application performance and reduce file size, use these strategies:

  • Delete objects that are not being used in the application. If an object is not being used in a state (and is not included in a transition), then delete it from that state. Select it and press Delete to remove it from the current state only. If an object is not used in the application, select it and click the Delete button (trash can) in the Layers panel.

  • Convert images to linked images.

  • Optimize vector graphics using the Optimize Artwork options in the HUD.

  • Compress graphics in the Library panel. Right-click a graphic in the Library panel, choose Compression Options, reduce the Quality setting, and choose OK.

  • Don't embed fonts if your users are likely to already have them. If you do embed fonts, use the Advanced button to limit how much of the font is embedded.

See the following for more information on optimizing artwork:

Optimizing graphics