Publishing Flash documents



Publishing overview

By default, the Publish command creates a Flash SWF file and an HTML document that inserts your Flash content in a browser window. The Publish command also creates and copies detection files for Macromedia Flash 4 from Adobe and later. If you change publish settings, Flash saves the changes with the document. After you create a publish profile, export it to use in other documents or for others working on the same project to use.

Flash® Player 6 and later support Unicode text encoding. With Unicode support, users can view multilanguage text, regardless of the language that the operating system running the player uses.

You can publish the FLA file in alternative file formats—GIF, JPEG, PNG, and QuickTime®—with the HTML needed to display them in the browser window. Alternative formats allow a browser to show your SWF file animation and interactivity for users who don’t have the targeted Adobe Flash Player installed. When you publish a Flash document (FLA file) in alternative file formats, the settings for each file format are stored with the FLA file.

You can export the FLA file in several formats, similar to publishing FLA files in alternative file formats, except that the settings for each file format are not stored with the FLA file.

Alternatively, create a custom HTML document with any HTML editor and include the tags required to display a SWF file.

To test how the SWF file works before you publish your SWF file, use Test Movie (Control > Test Movie) and Test Scene (Control > Test Scene).

The following video tutorials describe the Flash publishing and deployment process. Some videos show Flash CS3, but still apply to Flash CS4.

Playing Flash SWF files

The Flash SWF file format is for deploying Flash content.

You can play content in the following ways:

  • In Internet browsers that are equipped with Flash Player

  • With Flash Xtra in Director® and Authorware® from Adobe®

  • With the Flash ActiveX control in Microsoft Office and other ActiveX hosts

  • As part of a QuickTime video

  • As a stand-alone application called a projector

    The Flash SWF file format is an open standard that other applications support. For more information about Flash file formats, see www.adobe.com/go/flashplayer.

HTML documents

You need an HTML document to play a SWF file in a web browser and specify browser settings. To display a SWF file in a web browser, an HTML document must use the object and embed tags with the proper parameters.
Note: You can generate an HTML document using the correct object and embed tags using the Publish Settings dialog box, and selecting the HTML option. For more information, see Specify publish settings for HTML documents.

Flash can create the HTML document automatically when you publish a SWF file.

Detecting whether Flash Player is present

In order for your published Flash content to be seen by Web users, Flash Player must be installed in their Web browser.

The following resources and articles provide up-to-date information about how to add code to your web pages to determine if Flash Player is installed and provide alternative content in the page if it is not.

Publishing for mobile devices

Adobe® Flash® Lite® lets Flash users create engaging content for mobile phones using the ActionScript® scripting language, drawing tools, and templates. For detailed information on authoring for mobile devices, see Developing Flash Lite Applications and the Content Development Kits on the Mobile and Devices Development Center at www.adobe.com/go/devnet_devices.

Note: Depending on the mobile device for which you are developing, certain restrictions can apply as to which ActionScript commands and sound formats are supported. For more details, see Mobile Articles on the Mobile and Devices Development Center.

Adobe also provides Adobe Device Central, a new way to test content created with Adobe products on emulated mobile devices. When creating a new mobile document of any kind, start the creation process from Device Central. Device Central lets you select a target device from the beginning of the development process, and have a clear idea what a device’s limitations are.

Publishing secure Flash documents

Flash Player 8 and later contain the following features that help you ensure the security of your Flash documents:

Buffer overrun protection

Enabled automatically, this feature prevents the intentional misuse of external files in a Flash document to overwrite a user’s memory or insert destructive code such as a virus. This prevents a document from reading or writing data outside the document’s designated memory space on a user’s system.

Exact domain matching for sharing data between Flash documents

Flash Player 7 and later enforce a stricter security model than earlier versions. The security model changed in two primary ways between Flash Player 6 and Flash Player 7:

Exact domain matching
Flash Player 6 lets SWF files from similar domains (for example, www.adobe.com and store.adobe.com) communicate freely with each other and with other documents. In Flash Player 7, the domain of the data to be accessed must match the data provider’s domain exactly for the domains to communicate.

HTTPS/HTTP restriction
A SWF file that loads by using nonsecure (non-HTTPS) protocols cannot access content loaded by using a secure (HTTPS) protocol, even when both protocols are in exactly the same domain.

For more information about ensuring that content performs as expected with the new security model, see Understanding security in Learning ActionScript 2.0 in Adobe Flash.

Local and network playback security

Flash Player 8 and later include a security model that lets you determine the local and network playback security for SWF files that you publish. By default, SWF files are granted read access to local files and networks. However, a SWF file with local access cannot communicate with the network, and the SWF file cannot send files or information to any networks.

Allow SWF files to access network resources, letting the SWF file send and receive data. If you grant the SWF file access to network resources, local access is disabled, protecting information on the local computer from potentially being uploaded to the network.

To select the local or network playback security model for your published SWF files, use the Publish Settings dialog box.

Flash Player

Flash Player plays Flash content in the same way as it appears in a web browser or an ActiveX host application. Flash Player is installed with the Flash application. When you double-click Flash content, the operating system starts Flash Player, which then plays the SWF file. Use the player to make Flash content viewable for users who aren’t using a web browser or an ActiveX host application.

To control Flash content in Flash Player, use menu commands and the fscommand() function. For more information, see Sending messages to and from Flash Player in Learning ActionScript 2.0 in Adobe Flash.

Use the Flash Player context menu to print Flash content frames.

 Do one of the following:
  • To open a new or existing file, select File > New, or Open.

  • To change your view of the application, select View > Magnification and make a selection.

  • To control Flash content playback, select Control > Play, Rewind, or Loop Playback.

Reinstall Flash Player

If you are having trouble with your Flash Player installation, you can reinstall it.

  1. Close your browser.
  2. Remove any currently installed version of the player.

    For instructions, see TechNote 14157 on the Adobe® Flash® Support Center at www.adobe.com/go/tn_14157.

  3. To begin the installation, visit http://www.adobe.com/go/getflashplayer.

    Follow the on-screen instructions to install the player.

    You can also run one of the following installers in your Players folder. However, the installer on the Adobe website is usually more up to date than those in the Players folder.

    • For the ActiveX control for Windows® (Internet Explorer or AOL), run the Install Flash Player 9 AX.exe file.

    • For the plug‑in for Windows (Firefox, Mozilla, Netscape, Safari, or Opera), run the Install Flash Player 9.exe file.

    • For the plug‑in for Macintosh® (AOL, Firefox, Internet Explorer for Macintosh, Netscape, Opera, or Safari), run Install Flash Player 10 (Mac OS 9.x) or Install Flash Player 10 OS X (Mac OS X.x).
      Note: To verify the installation visit http://www.adobe.com/shockwave/welcome/ from within your web browser.

Configure a server for Flash Player

For users to view your Flash content on the web, the web server must be properly configured to recognize SWF files.

Your server may already be configured properly. To test server configuration, see TechNote 4151 on the Adobe Flash Support Center at www.adobe.com/go/tn_4151.

Configuring a server establishes the appropriate Multipart Internet Mail Extension (MIME) types so that the server can identify files with the .swf extension as Flash files.

A browser that receives the correct MIME type can load the appropriate plug‑in, control, or helper application to process and properly display the incoming data. If the MIME type is missing or not properly delivered by the server, the browser might display an error message or a blank window with a puzzle-piece icon.

  • If your site is established through an Internet service provider (ISP), ask the ISP to add this MIME type to the server: application/x-shockwave-flash with the .swf extension.

  • If you are administering your own server, see your web server documentation for instructions on adding or configuring MIME types.

  • Corporate and enterprise system administrators can configure Flash to restrict Flash Player access to resources in the local file system. Create a security configuration file that limits Flash Player functionality on the local system.

The security configuration file is a text file placed in the same folder as the Flash Player installer. The Flash Player installer reads the configuration file during installation and follows its security directives. Flash Player uses the System object to expose the configuration file to ActionScript.

With the configuration file, disable Flash Player access to the camera or microphone, limit the amount of local storage Flash Player can use, control the auto-update feature, and block Flash Player from reading anything from the user’s local hard disk.

For more information about security, see System in ActionScript 2.0 Language Reference.

Adding MIME Types

When a web server accesses files, the server must properly identify the files as Flash content to display them. If the MIME type is missing or not properly delivered by the server, the browser can show error messages or a blank window with a puzzle-piece icon.

If your server is not properly configured, you (or your server’s administrator) must add the SWF file MIME types to the server’s configuration files and associate the following MIME types with the SWF file extensions:

  • MIME type application/x-shockwave-flash has the .swf file extension.

  • MIME type application/futuresplash has the .spl file extension.

If you are administering a server, consult your server software documentation for instructions on adding or configuring MIME types. If you are not administering a server, contact your Internet service provider, web master, or server administrator to add the MIME type information.

If your site is on a Mac OS server, you must also set the following parameters: Action: Binary; Type: SWFL; and Creator: SWF2.

Search engine optimization for Flash content

In mid-2008, Adobe announced a significant advance in Flash Player technology that allows the text content inside SWF files to be indexed by search engines such as Google and Yahoo!. There are a variety of strategies you can employ to optimize the visibility of your SWF content to search engines. These practices as a whole are referred to as search engine optimization (SEO).

Adobe has added a SEO Technology Center to the Developer Connection section of Adobe.com. The SEO Technology Center contains the following articles that detail some of the techniques you can use to increase the visibility of your SWF files to internet searches: