What is Software? | What is Education? | What is Technology? | What is Research? | What is Wi-Fi? | What is Communication? | What is Customer Service?

Free SEO Tutorials & Help

Tutorials:   Adobe Flash   Adobe Photoshop   CorelDRAW   SEO  

Site Map

Website Development | Cable & Broadband Magazine | Solutions for Higher Education | Auction Anything Online

 

Adobe Flash Help & Tutorials

 Back to Topics

 

How to Publish Flash Documents

Playing your Flash SWF files

About publishing secure Flash documents

Configuring a server for Flash Player TOP

Publishing Flash documents

Setting publish options for the Flash SWF file formata

Setting the classpath

Specifying publish settings that create HTML documents with embedded Flash content

Configuring publish settings for Flash Player detection

 Specifying publish settings for GIF files

Specifying publish settings for JPEG files
 

Specifying publish settings for PNG files

Specifying publish settings for QuickTime videos

About publishing Flash Lite documents

Using publish profiles

Creating a publish profile

Duplicating a publish profile

Modifying a publish profile

Exporting a publish profile

Importing a publish profile

Deleting a publish profile

About HTML publishing templates

Customizing HTML publishing templates

Using HTML template variables

Creating an image map

Creating a text report

Creating a URL report

Using shorthand template variables

Embedding search metadata

Sample template

Editing Flash HTML settings

Using object and embed tags

Parameters and attributes

Devicefont attribute/parameter

src attribute

movie parameter

classid attribute

width attribute

height attribute

swliveconnect attribute

play attribute/parameter

loop attribute/parameter

quality attribute/parameter

bgcolor attribute/parameter

scale attribute/parameter

align attribute

salign parameter

base attribute

wmode attribute/parameter

wmode attribute/parameter

allowscriptaccess attribute/parameter

SeamlessTabbing parameter

Previewing the publishing format and settings

Using Flash Player

About configuring a web server for Flash

Playing your Flash SWF files

TOP

The Adobe Flash SWF file format is for deploying Flash content.

You can play Flash content in the following ways:

  • In Internet browsers such as Firefox and Internet Explorer that are equipped with Flash Player 8

  • With the Flash Xtra in Director and Authorware

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

  • As part of a QuickTime video

  • As a stand-alone video called a projector

The Flash SWF format is an open standard that is supported by other applications.

 

About publishing secure Flash documents

TOP

Flash Player 8 contains several features that help you ensure the security of your Flash documents. The security features are:

  • Buffer overrun protection

  • Exact domain matching for sharing data between documents

  • Local and network playback security

About buffer overrun protection

Buffer overrun protection 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 Flash document from reading or writing data outside the document's designated memory space on a user's system. Buffer overrun protection is enabled automatically.

About exact domain matching for sharing data between Flash documents

Flash Player 7 and later enforces a stricter security model than earlier versions of Flash Player. There were two primary changes in the security model between Flash Player 6 and Flash Player 7:

Exact domain matching Flash Player 6 lets SWF files from similar domains (for example, www.macromedia.com and store.macromedia.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 using nonsecure (non-HTTPS) protocols cannot access content loaded using a secure (HTTPS) protocol, even when both protocols are in exactly the same domain.

About local and network playback security

Flash Player 8 introduces a new 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 (the SWF file cannot send files or information to any networks).

You can choose to allow SWF files to access network resources, letting the SWF file both send and receive data. If you choose to 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.

You select the local or network playback security model for your published SWF files using the Publish Settings dialog box

 

Configuring a server for Flash Player

TOP

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 . If your server is not properly configured, follow the procedure below to configure it.

Configuring a server establishes the appropriate Multipart Internet Mail Extension (MIME) types so that the server can identify files with the .swf extension as Shockwave 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.

To configure a server for Flash Player, do one of the following:

  • 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 access by Flash Player to resources in the local file system. You can 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 exposes the configuration file to ActionScript using the System object.

With the configuration file, you can disable access by Flash Player 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.

 

Publishing Flash documents

TOP

To publish a Flash document, you select publish file formats and file format settings with the Publish Settings dialog box. Then you publish the Flash document using the Publish command. The publishing configuration that you specify in the Publish Settings dialog box is saved with the document. You can also create and name a publish profile so that the established publish settings are always available.

Depending on the options you specify in the Publish Settings dialog box, the Publish command creates the following files:

  • The Flash SWF file

  • Alternate images in a variety of formats that appear automatically when Flash Player is not available (GIF, JPEG, PNG, and QuickTime)

  • The supporting HTML document(s) required to show SWF content (or an alternate image) in a browser and control browser setting

  • Three HTML files (if you keep the default, Detect Flash Version, selected): the detection file, the content file, and the alternate file

  • Stand-alone projector files for Windows and Macintosh computers and QuickTime videos from Flash content (EXE, HQX, or MOV files, respectively)

NOTE : To alter or update a SWF file created with the Publish command, you must edit the original Flash document and then use the Publish command again to preserve all authoring information. Importing a Flash SWF file into Flash removes some of the authoring information.

To set general publish settings 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 specify.

  2. In the Publish Settings dialog box, select the option for each file format you want to create.

    The Flash SWF format is selected by default. The HTML format is also selected by default because you need an HTML file for a SWF file to appear in a browser. Tabs corresponding to the selected file formats appear above the current panel in the dialog box (except for Windows or Macintosh projector formats, which have no settings). For more information on publish settings for individual file formats, see the following sections.

  3. In the File text box for each selected format, either accept the default filename, which corresponds to the name of the document, or enter a new filename with the appropriate extension (such as .gif for a GIF file and .jpg for a JPEG file).

  4. Decide where to publish the files. By default, the files are published in the same location as the FLA file. To change where files are published, click the folder beside the filename and browse to a different location in which to publish the file.

  5. To create a stand-alone projector file, select Windows Projector or Macintosh Projector.

    NOTE : The Windows version of Flash adds the .hqx extension to the filename of a Macintosh projector file. You can create a Macintosh projector using the Windows versions of Flash, but you must use a file translator such as BinHex to make the resulting file appear as an application file in the Macintosh Finder.

  6. Click the tab for the format options you want to change. Specify publish settings for each format, as described in the following sections.

  7. When you have finished setting options, do one of the following:

    • To generate all the specified files, click Publish.

    • To save the settings with the FLA file and close the dialog box without publishing, click OK.

To publish a Flash document without selecting new publish settings:

  • Select File > Publish to create the files in the formats and location specified in the Publish Settings dialog box (either the default settings, the settings you selected previously, or the selected publish profile).

 

Setting publish options for the Flash SWF file format

TOP

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

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

    Not all Macromedia Flash Basic 8 and Flash Professional 8 features work in published SWF files that target Flash Player versions earlier than Flash Player 8.

    If you want to specify 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 Adobe 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.

    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- or ActionScript-intensive.

    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.

  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.

  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 About using sounds in Flash Lite. To save the settings with the current file, click OK.

  11. Select the Flash security model you want to use from the Local playback security pop-up menu.

    You must specify if you want your published SWF file to be granted local or network security access. Selecting Local Access Only lets the published SWF file interact with files and resources on the local system, but not on the network. Selecting Access Network Only lets the published SWF file interact with files and resources on the network, but not on the local system.

 

Setting the classpath

TOP

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.

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.

      You can also 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.

 

Specifying publish settings that create HTML documents with embedded Flash content

TOP

Playing Flash content in a web browser requires an HTML document that activates the SWF file and specifies browser settings. This document is generated automatically by the Publish command, from HTML parameters in a template document.

The template document can be any text file that contains the appropriate template variables--including a plain HTML file, one that includes code for special interpreters such as ColdFusion or Active Server Pages (ASP), or a template included with Flash

You can customize a built-in template (see Customizing HTML publishing templates) or manually enter HTML parameters for Flash using any HTML editor (see Editing Flash HTML settings).

HTML parameters determine where the Flash content appears in the window, the background color, the size of the SWF file, and so on, and set attributes for the object and embed tags. You can change these and other settings in the HTML panel of the Publish Settings dialog box. Changing these settings overrides options you've set in the SWF file.

To publish HTML that displays your Flash SWF file:

  1. Do one of the following to open the Publish Settings dialog box:

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

  2. On the Formats tab, the HTML file type is selected by default. In the File text box for the HMTL file, either use the default filename, which matches the name of your document, or enter a unique name, including the .html extension.

  3. Click the HTML tab to show HTML settings and select an installed template to use from the Template pop-up menu. Then click the Info button to the right to show a description of the selected template. The default selection is Flash Only.

  4. If, in the previous step, you selected an HTML template other than Image Map or QuickTime, and on the Flash tab, you set the Version to Flash Player 4 or later, you can select Flash Version Detection.

    NOTE : Flash Version Detection configures your document to detect the version of Flash Player that the user has and sends the user to an alternate HTML page if the user does not have the targeted player. For more information on version detection.

  5. Select a Dimensions option to set the values of the width and height attributes in the object and embed tags:

    Match Movie (the default) uses the size of the SWF file.

    Pixels enters the number of pixels for the width and height in the Width and Height field.

    Percent specifies the percentage of the browser window that the SWF file will occupy.

  6. Select Playback options to control the SWF file's playback and features, as described in the following list:

    Paused at Start pauses the SWF file until a user clicks a button or selects Play from the shortcut menu. By default, the option is deselected and the Flash content begins to play as soon as it is loaded (the PLAY parameter is set to true).

    Loop repeats the Flash content when it reaches the last frame. Deselect this option to stop the Flash content when it reaches the last frame. (The LOOP parameter is on by default.)

    Display Menu shows a shortcut menu when users right-click (Windows) or Control-click (Macintosh) the SWF file. Deselect this option to show only About Flash in the shortcut menu. By default, this option is selected (the MENU parameter is set to true).

    Device Font (Windows only) substitutes anti-aliased (smooth-edged) system fonts for fonts not installed on the user's system. Using device fonts increases the legibility of type at small sizes and can decrease the SWF file's size. This option affects only SWF files that contain static text (text that you create when authoring a SWF file and that does not change when the Flash content appears) set to display with device fonts.

  7. Select Quality options to determine the trade-off between processing time and appearance, as described in the following list. This option sets the QUALITY parameter's value in the object and embed tags.

    Low favors playback speed over appearance and does not use anti-aliasing.

    Auto Low emphasizes speed at first but improves appearance whenever possible. Playback begins with anti-aliasing turned off. If Flash Player detects that the processor can handle it, anti-aliasing is automatically turned on.

    Auto High emphasizes playback speed and appearance equally at first but sacrifices appearance for playback speed if necessary. Playback begins with anti-aliasing turned on. If the actual frame rate drops below the specified frame rate, anti-aliasing is turned off to improve playback speed. Use this setting to emulate the View > Antialias setting in Flash.

    Medium applies some anti-aliasing but does not smooth bitmaps. It produces a better quality than the Low setting but lower quality than the High setting.

    High (the default) favors appearance over playback speed and always uses anti-aliasing. If the SWF file does not contain animation, bitmaps are smoothed; if the SWF file has animation, bitmaps are not smoothed.

    Best provides the best display quality and does not consider playback speed. All output is anti-aliased and bitmaps are always smoothed.

  8. Select a Window Mode option, which controls the HTML wmode attribute in the object and embed tags. The window mode modifies the relationship of the Flash content bounding box or virtual window with content in the HTML page as described in the following list:

    Window does not embed any window-related attributes in the object and embed tags. The background of the Flash content is opaque and uses the HTML background color. The HTML cannot render above or below the Flash content. This is the default setting.

    Opaque Windowless sets the background of the Flash content to opaque, obscuring anything underneath the Flash content. Opaque Windowless lets HTML content appear above or on top of Flash content.

    Transparent Windowless sets the background of the Flash content to transparent. This allows the HTML content to appear above and below the Flash content.

    NOTE : In some instances, complex rendering in Transparent Windowless mode can result in slower animation when the HTML images are also complex.

    See the table following this procedure for browsers that support windowless modes.

  9. Select one of the following HTML Alignment options to position the Flash SWF window in the browser window:

    Default centers the Flash content in the browser window and crops edges if the browser window is smaller than the application.

    Left, Right, Top, or Bottom align SWF files along the corresponding edge of the browser window and crop the remaining three sides as needed.

  10. Select a Scale option to place the Flash content within specified boundaries, if you've changed the document's original width and height. The Scale option sets the SCALE parameter in the object and embed tags.

    Default (Show All) shows the entire document in the specified area without distortion while maintaining the original aspect ratio of the SWF files. Borders can appear on two sides of the application.

    No Border scales the document to fill the specified area and keeps the SWF file's original aspect ratio without distortion, cropping the SWF file if needed.

    Exact Fit displays the entire document in the specified area without preserving the original aspect ratio, which can cause distortion.

    No Scale prevents the document from scaling when the Flash Player window is resized.

  11. Select a Flash Alignment option to set how the Flash content is placed within the application window and how it is cropped, if necessary. This option sets the SALIGN parameter of the object and embed tags.

    • For Horizontal alignment, select Left, Center, or Right.

    • For Vertical alignment, select Top, Center, or Bottom.

  12. Select Show Warning Messages to show error messages if tag settings conflict--for example, if a template has code referring to an alternate image that has not been specified.

  13. To save the settings with the current file, click OK.

The following browsers support windowless modes :

Operating system

Internet Explorer

Netscape

Other

Macintosh OS X 10.1.5 and 10.2

5.1 and IE 5.2

7.0 and later

  • Opera 6 or later

  • Mozilla 1.0 or later

  • AOL/Compuserve

Windows

5.0, 5.5, and 6.0

7.0 and later

  • Opera 6 or later

  • Mozilla 1.0 or later

  • AOL/Compuserve


 

Configuring publish settings for Flash Player detection

TOP

You can configure your document to detect your users' Flash Player version. If you select Detect Flash Version in the Publish Settings dialog box, your SWF is embedded in a web page that includes Flash Player detection code. If the detection code finds an acceptable version of Flash Player installed on the end user's computer, the SWF file plays as designed. If an end user does not have the version of Flash needed to view the SWF, an HTML page with a link from which to download the latest version of Flash Player is displayed. Flash Player detection is available only for publish settings set to Flash Player 4 or later, and for SWF files embedded in the Flash Only or Flash HTTPS templates.

NOTE : Flash Player 5 and later are installed on 98% of Internet-connected computers, making Flash Player detection a reasonable method by which to ensure that end users have the correct version of Flash installed with which to view your content.

The HTML templates listed below do not support Flash Player detection. This is because the JavaScript in those templates conflicts with the JavaScript used to detect the Flash Player. To detect for the presence of Flash Player before allowing a browser to view SWF files that use the templates listed below, you must create a separate HTML page with its own SWF file to detect Flash Player before redirecting browsers to the HTML page containing the Flash content. The templates that do not directly support Flash player detection are:

  • Flash for PocketPC 2003

  • Flash with AICC Tracking

  • Flash with FSCommand

  • Flash with Named Anchors

  • Flash with SCORM Tracking

The following HTML Templates do not support Player Detection because they do not embed the Flash Player:

  • Image Map

  • QuickTime

To enable Flash Player detection:

  1. Select File > Publish Settings, and select the HTML tab.

  2. Select either the Flash Only or Flash HTTPS template from the Template pop-up menu. The Flash Only and Flash HTTPS templates support the new single-page HTML detection kit. Selecting either of these templates enables the Detect Flash Version check box and the version number text boxes.

  3. Select the Detect Flash Version check box.

  4. (Optional) You can use the Major Revision and Minor Revision text boxes to specify precise revisions of Flash Player. For example, you might specify Flash Player version 7.0.2 if it provided a feature specific to displaying your SWF file.

    When you publish your SWF file, Flash creates a single HTML page in which to embed the SWF and the Flash Player detection code. If an end user does not have the version of Flash you've specified to view the SWF, an HTML page with a link from which to download the latest version of Flash Player is displayed.

 

Specifying publish settings for GIF files

TOP

GIF files provide an easy way to export drawings and simple animations for use in web pages. Standard GIF files are simply compressed bitmaps.

An animated GIF file (sometimes referred to as a GIF89a) offers a simple way to export short animation sequences. Flash optimizes an animated GIF file, storing only frame-to-frame changes.

Flash exports the first frame in the SWF file as a GIF file, unless you mark a different keyframe for export by entering the frame label #Static in the Property inspector. Flash exports all the frames in the current SWF file to an animated GIF file unless you specify a range of frames for export by entering the frame labels #First and #Last in the appropriate keyframes.

Flash can generate an image map for a GIF file to maintain URL links for buttons in the original document. You use the Property inspector to place the frame label #Map in the keyframe in which you want to create the image map. If you don't create a frame label, Flash creates an image map using the buttons in the last frame of the SWF file. You can create an image map only if the $IM template variable is present in the template you select. For more information, see Creating an image map.

To publish a GIF file with your Flash file:

  1. Do one of the following to open the Publish Settings dialog box:

    • 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 specify.

  2. On the Formats tab, select the GIF Image type. In the File text box for the GIF image, either use the default filename or enter a new filename with the .gif extension.

  3. Click the GIF tab to show the file settings.

  4. For Dimensions, enter a width and height in pixels for the exported bitmap image, or select Match Movie to make the GIF the same size as the Flash SWF file and maintain the aspect ratio of your original image.

  5. Select a Playback option to determine whether Flash creates a still (Static) image or an animated GIF (Animation). If you select Animation, select Loop Continuously or enter the number of repetitions.

  6. Select one of the following options to specify a range of appearance settings for the exported GIF file:

    Optimize Colors removes any unused colors from a GIF file's color table. This option reduces the file size by 1000 to 1500 bytes without affecting image quality, but slightly increases the memory requirements. This option has no effect on an adaptive palette. (An adaptive palette analyzes the colors in the image and creates a unique color table for the selected GIF file.)

    Interlace incrementally shows the exported GIF file in a browser as it downloads. Interlacing lets the user see basic graphic content before the file has completely downloaded and can download the file faster over a slow network connection. Do not interlace an animated GIF image.

    Smooth applies anti-aliasing to an exported bitmap to produce a higher-quality bitmap image and improve text display quality. However, smoothing might cause a halo of gray pixels to appear around an anti-aliased image placed on a colored background, and it increases the GIF file size. Export an image without smoothing if a halo appears or if you're placing a GIF transparency on a multicolored background.

    Dither Solids applies dithering to solid colors as well as gradients. For more information, see Dither options in step 8.

    Remove Gradients, which is turned off by default, converts all gradient fills in the SWF file to solid colors using the first color in the gradient. Gradients increase the size of a GIF file and are often poor quality. If you use this option, select the first color of your gradients carefully to prevent unexpected results.

  7. Select one of the following Transparent options to determine the transparency of the application's background and the way alpha settings are converted to GIF:

    Opaque makes the background a solid color.

    Transparent makes the background transparent.

    Alpha sets partial transparency. You can enter a Threshold value between 0 and 255. A lower value results in greater transparency. A value of 128 corresponds to 50% transparency.

  8. Select a Dither option to specify how pixels of available colors are combined to simulate colors not available in the current palette. Dithering can improve color quality, but it increases the file size. Select from the following options:

    None turns off dithering and replaces colors not in the basic color table with the solid color from the table that most closely approximates the specified color. Turning dithering off can result in smaller files but unsatisfactory colors.

    Ordered provides good-quality dithering with the smallest increase in file size.

    Diffusion provides the best-quality dithering but increases file size and processing time. It also works only with the web 216 color palette selected.

  9. Select one of the following Palette Types to define the image's color palette:

    Web 216 uses the standard 216-color, browser-safe palette to create the GIF image, for good image quality and the fastest processing on the server.

    Adaptive analyzes the colors in the image and creates a unique color table for the selected GIF file. This option is best for systems displaying thousands or millions of colors; it creates the most accurate color for the image but increases file size. To reduce the size of a GIF with an adaptive palette, use the Max Colors option in step 10 to decrease the number of colors in the palette.

    Web Snap Adaptive is the same as the Adaptive palette option except it converts similar colors to the web 216 color palette. The resulting color palette is optimized for the image, but when possible, Flash uses colors from the web 216 palette. This produces better colors for the image when the web 216 palette is active on a 256-color system.

    Custom specifies a palette that you have optimized for the selected image. The custom palette is processed at the same speed as the web 216 palette. To use this option, you should know how to create and use custom palettes. To select a custom palette, click the Ellipsis (...) button to the right of the Palette box at the bottom of the dialog box and select a palette file. Flash supports palettes saved in the ACT format, exported by Macromedia Fireworks and other leading graphics applications.

  10. If you selected the Adaptive or Web Snap Adaptive palette in step 9, enter a value for Max Colors to set the number of colors used in the GIF image. Selecting a smaller number of colors can produce a smaller file but can degrade the colors in the image.

  11. Click OK to save the settings with the current file.

Specifying publish settings for JPEG files

TOP

The JPEG format lets you save an image as a highly compressed, 24-bit bitmap. Generally, GIF format is better for exporting line art, and JPEG format is better for images with continuous tones, such as photographs, gradients, or embedded bitmaps.

Flash exports the first frame in the SWF file as a JPEG, unless you mark a different keyframe for export by entering the frame label #Static.

To publish a JPEG file with your Flash SWF file:

  1. Do one of the following to open the Publish Settings dialog box:

    • 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 specify, see Using publish profiles.

  2. On the Formats tab, select the JPEG Image type. For the JPEG filename, either use the default filename, or enter a new filename with the .jpg extension.

  3. Click the JPEG panel to show its settings.

  4. For Dimensions, enter a width and height in pixels for the exported bitmap image, or select Match Movie to make the JPEG image the same size as the Stage and maintain the aspect ratio of your original image.

  5. For Quality, drag the slider or enter a value to control the amount of JPEG file compression.

    The lower the image quality, the smaller the file size, and vice versa. Try different settings to determine the best compromise between size and quality.

    NOTE : You can set the bitmap export quality per object using the Bitmap Properties dialog box to change the object's compression setting. Selecting the default compression option in the Bitmap Properties dialog box applies the Publish Settings JPEG Quality option.

  6. Select Progressive to show Progressive JPEG images incrementally in a web browser, which makes images appear faster when loading with a slow network connection.

    This option is similar to interlacing in GIF and PNG images.

  7. To save the settings with the current file, click OK.

 

Specifying publish settings for PNG files

TOP

PNG is the only cross-platform bitmap format that supports transparency (an alpha channel). It is also the native file format for Macromedia Fireworks.

Flash exports the first frame in the SWF file as a PNG file, unless you mark a different keyframe for export by entering the frame label #Static.

To publish a PNG file with your Flash SWF file:

  1. Do one of the following to open the Publish Settings dialog box:

    • 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 specify, see Using publish profiles.

  2. On the Formats tab, select the PNG Image type. For the PNG filename, either use the default filename, or enter a new filename with the .png extension.

  3. Click the PNG tab. For Dimensions, enter values for width and height in pixels for the exported bitmap image, or select Match Movie to make the PNG image the same size as the Flash SWF file and maintain the aspect ratio of your original image.

  4. Select a bit depth to set the number of bits per pixel and colors to use in creating the image:

    • Select 8-bit for a 256-color image.

    • Select 24-bit for thousands of colors.

    • Select 24-bit with Alpha for thousands of colors with transparency (32 bits).

    The higher the bit depth, the larger the file.

  5. Select one of the following options to specify appearance settings for the exported PNG:

    Optimize Colors removes any unused colors from a PNG file's color table. This option reduces the file size by 1000 to 1500 bytes without affecting image quality but increases the memory requirements slightly. This option has no effect on an adaptive palette.

    Interlace incrementally shows the exported PNG in a browser as it downloads. Interlacing lets the user see basic graphic content before the file has completely downloaded and might download the file faster with a slow network connection. Do not interlace an animated PNG file.

    Smooth applies anti-aliasing to an exported bitmap to produce a higher-quality bitmap image and improve text display quality. However, smoothing might cause a halo of gray pixels to appear around an anti-aliased image placed on a colored background, and it increases the PNG file size. Export an image without smoothing if a halo appears or if you're placing a PNG transparency on a multicolored background.

    Dither Solids applies dithering to solid colors and gradients. For more information, see Dither options in step 6.

    Remove Gradients, which is turned off by default, converts all gradient fills in the application to solid colors using the first color in the gradient. Gradients increase the size of a PNG and are often poor quality. If you use this option, select the first color of your gradients carefully to prevent unexpected results.

  6. If you selected 8-bit for Bit Depth in step 4, select a Dither option to specify how pixels of available colors are mixed to simulate colors not available in the current palette. Dithering can improve color quality, but it increases file size. Select from the following options:

    None turns off dithering and replaces colors not in the basic color table with the solid color from the table that most closely approximates the specified color. Turning dithering off can produce smaller files but unsatisfactory colors.

    Ordered provides good-quality dithering with the smallest increase in file size.

    Diffusion provides the best-quality dithering but increases file size and processing time. It also works only with the web 216 color palette selected.

  7. Select one of the following Palette Types to define the color palette for the PNG image:

    Web 216 uses the standard 216-color, browser-safe palette to create the PNG image, for good image quality and the fastest processing on the server.

    Adaptive analyzes the colors in the image and creates a unique color table for the selected PNG file. This option is best for systems showing thousands or millions of colors; it creates the most accurate color for the image but results in a file size larger than a PNG created with the web 216 palette.

    Web Snap Adaptive is the same as the Adaptive palette option except that it converts very similar colors to the web 216 color palette. The resulting color palette is optimized for the image, but when possible, Flash uses colors from web 216. This produces better colors for the image when the web 216 palette is active on a 256-color system.

    To reduce the size of a PNG file with an adaptive palette, use the Max Colors option to decrease the number of palette colors, as described in the next step.

    Custom specifies a palette that you have optimized for the selected image. The custom palette is processed at the same speed as the web 216 palette. To use this option, you should know how to create and use custom palettes. To select a custom palette, click the Ellipsis (...) button to the right of the Palette box at the bottom of the dialog box and select a palette file. Flash supports palettes saved in the ACT format, exported by Macromedia Fireworks and other leading graphics applications.

  8. If you selected the Adaptive or Web Snap Adaptive palette in step 7, enter a value for Max Colors to set the number of colors used in the PNG image. Selecting a smaller number of colors can produce a smaller file but might degrade the colors in the image.

  9. Select one of the following Filter options to select a line-by-line filtering method to make the PNG file more compressible, and experiment with the different options for a particular image:

    None turns off filtering.

    Sub transmits the difference between each byte and the value of the corresponding byte of the prior pixel.

    Up transmits the difference between each byte and the value of the corresponding byte of the pixel immediately above.

    Average uses the average of the two neighboring pixels (left and above) to predict the value of a pixel.

    Path computes a simple linear function of the three neighboring pixels (left, above, upper left), and then selects the neighboring pixel closest to the computed value as a predictor of the color.

    Adaptive analyzes the colors in the image and creates a unique color table for the selected PNG file. This option is best for systems showing thousands or millions of colors; it creates the most accurate color for the image but results in a file size larger than a PNG created with the web 216 palette. You can reduce the size of a PNG created with an adaptive palette by decreasing the number of colors in the palette.

  10. To save the settings with the current file, click OK.

Specifying publish settings for QuickTime videos

TOP

The QuickTime Publish Settings option creates videos in the same QuickTime format you have installed on your computer. For example, if you have QuickTime 5 installed, Flash publishes the QuickTime video in version 5.

The Flash document plays in the QuickTime video exactly as it does in Flash Player, retaining all its interactive features. If the Flash document also contains a QuickTime video, Flash copies it to its own track in the new QuickTime file.

The current version of the QuickTime Player (as of this writing) supports Flash Player 4 SWF file playback. For best results, Flash content that you export to the QuickTime format should contain only those features supported by Flash Player 4. Future releases of the QuickTime Player might support additional Flash file formats.

If you try to export Flash Player 6 or 7 content to the QuickTime format, an error message will appear, indicating that the installed version of QuickTime does not support that version of Flash Player. To resolve this issue, you can select Flash Player 4 from the Version pop-up menu on the Flash tab of the Publish Settings dialog box.

If a newer version of the QuickTime Player becomes available that supports Flash Player 6 and later versions, you can install the updated QuickTime version and publish your document as QuickTime files that target those versions of Flash Player.

To publish a QuickTime video with your Flash SWF file:

  1. Do one of the following to open the Publish Settings dialog box:

    • 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 specify.

  2. On the Formats tab, select the QuickTime file type. For the QuickTime filename, either use the default filename, or enter a new filename with the .mov extension.

  3. Click the QuickTime panel to show its settings.

  4. For Dimensions, enter a width and height in pixels for the exported QuickTime video, or select Match Movie to make the QuickTime video the same size as the Flash SWF file and keep its aspect ratio.

  5. Select one of the following Alpha options to control the transparency (alpha) mode of the Flash track in the QuickTime video without affecting any alpha settings in the Flash application:

    Alpha Transparent makes the Flash track SWF file transparent and shows any content in tracks behind the Flash track.

    Copy makes the Flash track opaque and masks all content in tracks behind the Flash track.

    Auto makes the Flash track transparent if it is on top of any other tracks, but opaque if it is the bottom or only track in the SWF file.

  6. Select one of the following Layer options to control where the Flash track plays in the stacking order of the QuickTime video:

    Top places the Flash track always on top of other tracks in the QuickTime video.

    Bottom places the Flash track always behind other tracks.

    Auto places the Flash track in front of other tracks if Flash objects are in front of video objects in the Flash application, and behind all other tracks if Flash objects are not in front.

  7. Select Streaming Sound to have Flash export all the streaming audio in the Flash SWF file to a QuickTime sound track, recompressing the audio using the standard QuickTime audio settings. To change these options, click Audio Settings.

  8. Select Controller to specify the type of QuickTime controller used to play the exported video--None, Standard, or QuickTime VR.

  9. Select one of the following Playback options to control how QuickTime plays a video:

    Looping repeats the video when it reaches the last frame.

    Paused at Start pauses the video until a user clicks a button in the video or selects Play from the shortcut menu. By default, the option is deselected; that is, the video begins to play as soon as it is loaded.

    Play Every Frame shows every frame of the video without skipping to maintain time and does not play sound.

  10. Select File Flatten (Make Self-Contained) to combine the Flash content and imported video content into a single QuickTime video. Deselecting this option makes the QuickTime video refer to the imported files externally; the video won't work properly if these files are missing.

  11. To save the settings with the current file, click OK.

 

About publishing Flash Lite documents

TOP

Macromedia Flash Lite lets Flash designers, developers, and content providers quickly create engaging content for mobile phones using the ActionScript scripting language, drawing tools, and templates.

 

Using publish profiles

TOP

You can create a publish profile that saves a publish settings configuration. You can then export the publish profile to other documents or for others to use them. Conversely, you can import publish profiles to use in your document. Publish profiles offer many advantages, including the following:

  • You can create profiles to publish in several media formats.

  • You can create a publish profile for in-house use that differs from the way you'd publish the files for a client.

  • Your company can create a standard publish profile to ensure files are published uniformly.

Publish profiles, as with default publish settings, are saved at the document rather than application level. To use a publish profile in another document, you export it and import it into the other file.

 

Creating a publish profile

TOP

The Publish Settings dialog box includes a Create New Profile button, which creates a profile based on the publish settings you've specified.

To create a publish profile:

  1. In the Publish Settings dialog box, click the Create New Profile (+) button.

  2. In the Create New Profile dialog box, name the publish profile, and click OK.

    The newly created publish profile appears as a selection in the Current Profile pop-up menu of the Publish Settings dialog box.

  3. Specify the publish settings for your document in the Publish Settings dialog box (File > Publish Settings), and click OK.

 

Duplicating a publish profile

TOP

If you've modified publish settings for a publish profile and you want to save the modifications, you can create a duplicate profile.

To duplicate a publish profile:

  1. From the Current Profile pop-up menu in the Publish Settings dialog box (File > Publish Settings), select the publish profile that you want to copy.

  2. Click the Duplicate Profile button.

  3. In the Duplicate Profile dialog box, enter the profile name in the Duplicate Name text box, and click OK.

The duplicate publish profile appears as a selection in the Current Profile pop-up menu of the Publish Settings dialog box.

 

Modifying a publish profile

TOP

To modify a publish profile, you simply change the settings in the Publish Settings dialog box.

To modify a publish profile:

  1. From the Current Profile pop-up menu in the Publish Settings dialog box (File > Publish Settings), select the publish profile that you want to copy.

  2. Specify the new publish settings for your document, and click OK.

 

Exporting a publish profile

TOP

You can export a publish profile as an XML file for import into other documents. After import, the publish profile appears in the Publish Settings dialog box as an option in the Current Profile pop-up menu.

To export a publish profile:

  1. From the Current Profile pop-up menu in the Publish Settings dialog box (File > Publish Settings), select the publish profile that you want to export.

  2. Click the Import/Export Profile button, and select Export.

  3. In the Export Profile dialog box, either accept the default location in which to save the publish profile or browse to a new location and click Save.

 

Importing a publish profile

TOP

Other users can create and export publish profiles, which you can import and select as a publish settings option.

To import a publish profile:

  1. In the Publish Settings dialog box (File > Publish Settings), click Import/Export Profile, and select Import.

  2. In the Import Profile dialog box, browse to the publish profile XML file, and click Open.

 

Deleting a publish profile

TOP

When you no longer need a publish profile, you can delete it from the document.

To delete a publish profile:

  1. In the Publish Settings dialog box (File > Publish Settings), select the publish profile that you want to delete in the Current Profile pop-up menu.

  2. Click the Delete Profile button. In the dialog box that requests confirmation of the deletion, click OK.

About HTML publishing templates

TOP

A Flash HTML template is a text file that contains both static HTML code and flexible template code consisting of a special type of variables (which differ from ActionScript variables). When you publish a Flash SWF file, Flash replaces these variables with the values you selected in the HTML tab of the Publish Settings dialog box and produces an HTML page with your SWF file embedded.

Flash includes various templates, suitable for most users' needs, that eliminate the need to manually create an HTML page that displays the Flash SWF file. For example, the Flash Only template is useful for quickly testing your files in a browser. It simply places the Flash SWF file on the HTML page so that you can view it through a web browser with the Flash Player installed.

You can easily use the same template, change the settings, and publish a new HTML page. If you're proficient in HTML, you can also create custom templates using any HTML editor. Creating a template is the same as creating a standard HTML page, except that you replace specific values pertaining to a Flash SWF file with variables that begin with a dollar sign ($).

Flash HTML templates have the following special characteristics:

  • A one-line title that appears on the Template pop-up menu in the HTML tab of the Publish Settings dialog box.

  • A longer description that appears when you click the Info button in the HTML tab of the Publish Settings dialog box.

  • Template variables beginning with a dollar sign ($) that specify where parameter values should be substituted when Flash generates the output file.

    NOTE :Use a backslash and dollar sign (\ $) combination if you need to use a dollar sign for another purpose in the document.

  • HTML object and embed tags that follow the tag requirements of Microsoft Internet Explorer and Netscape Communicator/Navigator, respectively. To display a SWF file properly on an HTML page, you must follow these tag requirements. Internet Explorer opens a Flash SWF file using the object HTML tag; Netscape uses the embed tag.

 

Customizing HTML publishing templates

TOP

If you're familiar with HTML, you can modify HTML template variables to create an image map, a text report, or a URL report, or to insert custom values for some of the most common Flash object and embed parameters (for Internet Explorer and Netscape Communicator/Navigator, respectively).

Flash templates can include any HTML content for your application or even code for special interpreters such as ColdFusion and ASP.

To modify an HTML publishing template:

  1. Using an HTML editor, open the Flash HTML template you want to change. These templates can be found in the following locations:

    For Windows operating systems:

    Windows 2000 or Windows XP boot drive:\Documents and Settings\user\Local Settings\ Application Data\Macromedia\Flash 8\language\Configuration\HTML

    • The boot drive is the drive from which Windows 2000 or Windows XP boots (usually C:).

    • The user is the name of the person logged in to the Windows 2000 or Windows XP operating system.

    • The language is set to an abbreviated language name. For example, in the US, language is set to "en" for English.

      NOTE : The Application Data folder is normally a hidden folder; you might need to change your Windows Explorer settings to see this folder.

    Windows 98 boot drive:\Program Files\Macromedia\Flash 8\language\ First Run\HTML

    For Macintosh operating systems:

    Macintosh OS X 10.3 and later Macintosh HD/Applications/Macromedia Flash 8/First Run/HTML

  2. Edit the template as needed.

    • For information on variables that Flash supports, see the table that follows this procedure.

    • For information on creating an image map or a text or URL report, or to insert custom values for object and embed parameters, see the sections for those topics, which follow this procedure.

  3. When you finish editing the variables, save the template in the same folder from which you retrieved it.

  4. To apply the template settings to your Flash SWF file, select File > Publish Settings, select the HTML panel, and select the template you modified.

    Flash changes only the template variables in the template selected in the Publish Settings dialog box.

  5. Select your remaining publish settings, and click OK.

 

Using HTML template variables

TOP

The following table lists the template variables that Flash recognizes.

Attribute/parameter

Template variable

Template title

$TT

Template description start

$DS

Template description finish

$DF

Flash (SWF file) title

$T1

Flash (SWF file) title for search engine metadata

$TL

Description for search engine metadata

$DC

Metadata XML string for use with search engines

$MD

Width

$WI

Height

$HE

Movie

$MO

HTML alignment

$HA

Looping

$LO

Parameters for object

$PO

Parameters for embed

$PE

Play

$PL

Quality

$QU

Scale

$SC

Salign

$SA

Wmode

$WM

Devicefont

$DE

Bgcolor

$BG

Movie text (area to write movie text)

$MT

Movie URL (location of SWF file URL)

$MU

Image width (unspecified image type)

$IW

Image height (unspecified image type)

$IH

Image filename (unspecified image type)

$IS

Image map name

$IU

Image map tag location

$IM

QuickTime width

$QW

QuickTime height

$QH

QuickTime filename

$QN

GIF width

$GW

GIF height

$GH

GIF filename

$GN

JPEG width

$JW

JPEG height

$JH

JPEG filename

$JN

PNG width

$PW

PNG height

$PH

PNG filename

$PN

 

Creating an image map

TOP

Flash can generate an image map to show any image and maintain the function of buttons that link to URLs. When an HTML template includes the $IM template variable, Flash inserts the image map code. The $IU variable identifies the name of the GIF, JPEG, or PNG file.

To create an image map:

  1. In your Flash document, select the keyframe to be used for the image map and label it #Map in the frame Property inspector (select Window > Properties if the Property inspector is not visible). You can use any keyframe with buttons that have attached Get URL actions.

    If you don't create a frame label, Flash creates an image map using the buttons in the last frame of the SWF file. This option generates an embedded image map, not an embedded Flash SWF file.

  2. To select the frame to show the image map, do one of the following:

    • For PNG or GIF files, label the frame to appear as #Static.

    • For JPEG, during the publish operation, place the playhead on the frame to be used for display.

  3. In an HTML editor, open the HTML template you'll modify. Flash stores HTML templates in the following location: boot drive:\Program Files\Macromedia\Flash 8\ language\First Run\HTML.

  4. Save your template.

  5. Select File > Publish Settings, click the Format tab, and select a format for the image map: GIF, JPEG, or PNG.

  6. Click OK to save your settings.

    For example, insert the following code in a template:

$IM

<img src=$IS usemap=$IU width=$IW height=$IH BORDER=0>

This might produce the following code in the HTML document created by the Publish command:

<map name="mymovie">

<area coords="130,116,214,182" href="http://www.macromedia.com">

</map>

<img src="mymovie.gif" usemap="#mymovie" width=550 height=400 border=0>

 

Creating a text report

TOP

The $MT template variable causes Flash to insert all the text from the current Flash SWF file as a comment in the HTML code. This is useful for indexing the content of a SWF file and making it visible to search engines.

 

Creating a URL report

OP

The $MU template variable makes Flash generate a list of the URLs referred to by actions in the current SWF file and insert it at the current location as a comment. This lets link verification tools see and verify the links in the SWF file.

 

Using shorthand template variables

TOP

The $PO (for object tags) and $PE (for embed tags) template variables are useful shorthand elements. Each variable causes Flash to insert into a template any nondefault values for some of the most common Flash object and embed parameters, including PLAY ($PL), QUALITY ($QU), SCALE ($SC), SALIGN ($SA), WMODE ($WM), DEVICEFONT ($DE), and BGCOLOR ($BG). For an example of these variables, see the sample template in the following section.

 

Embedding search metadata

TOP

The $TL (SWF file title) and $DC (description metadata) template variables let you include search metadata in the HTML. This is useful for making the SWF file more visible to search engines, and providing meaningful search results. You can use the $MD template variable to include the search metadata as an XML string.

 

Sample template

TOP

The following Default.HTML template file in Flash includes many of the commonly used template variables:

$TTFlash Only

$DS

Display Macromedia Flash Movie in HTML.

$DF

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

$CS

<title>$TI</title>

</head>

<body bgcolor="$BG">

<!--url's used in the movie-->

$MU

<!--text used in the movie-->

$MT

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="$WI" height="$HE" id="$TI" align="$HA">

<param name="allowScriptAccess" value="sameDomain" />

$PO

<embed $PEwidth="$WI" height="$HE" name="$TI" align="$HA" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />

</object>

</body>

</html>

 

Editing Flash HTML settings

TOP

You need an HTML document to play a Flash SWF file in a web browser and specify browser settings. If you are experienced with HTML, you can change or enter HTML parameters in an HTML editor or create custom HTML files to control a Flash SWF file.

You can also have Flash create the HTML document automatically when you publish a SWF file

 

Using object and embed tags

TOP

To display a Flash SWF file in a web browser, an HTML document must use the object and embed tags with the proper parameters.

For object, four settings (height, width, classid, and codebase) are attributes that appear within the object tag; all others are parameters that appear in separate, named param tags, as shown in the following example:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100" height="100" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0">

<param name="movie" value="moviename.swf">

<param name="play" value="true">

<param name="loop" value="true">

<param name="quality" value="high">

</object>

For the embed tag, all settings (such as height, width, quality, and loop) are attributes that appear between the angle brackets of the opening embed tag, as shown in the following example:

<embed src="moviename.swf" width="100" height="100" play="true" loop="true" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">

</embed>

To use both tags, position the embed tag before the closing object tag, as shown in the following example:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100" height="100" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0">

<param name="movie" value="moviename.swf">

<param name="play" value="true">

<param name="loop" value="true">

<param name="quality" value="high">

<embed src="moviename.swf" width="100" height="100" play="true" loop="true" quality="high"
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">

</embed>

</object>

NOTE : If you use both the object and the embed tags, use identical values for each attribute or parameter to ensure consistent playback across browsers. The parameter swflash.cab#version=7,0,0,0 is optional, and you can omit it if you don't want to check for the version number.

 

Parameters and attributes

TOP

The following tag attributes and parameters describe the HTML code created by the Publish command. You can refer to this list as you write custom HTML to show Flash content. Unless noted, all items apply to both the object and embed tags. Optional entries are noted. Parameters are used with the object tag and are recognized by Internet Explorer, but the embed tag is  recognized by Netscape. Attributes are used with both the object and embed tags. When you customize a template, you can substitute a template variable (identified in the Value section for each parameter in the list that follows) for the value. For more information, see Customizing HTML publishing templates.

NOTE : The attributes and parameters listed in this section are shown in lowercase letters purposely to comply with the XHTML standard.

Devicefont attribute/parameter

TOP

Value

true | false

Template variable: $DE

Description

(Optional) Specifies whether static text objects that the Device Font option has not been selected for will be drawn using device fonts anyway, if the necessary fonts are available from the operating system.

 

src attribute

TOP

Value

movieName.swf

Template variable: $MO

Description

Specifies the name of the SWF file to be loaded. Applies to the embed tag only.

movie parameter

TOP

Value

movieName.swf

Template variable: $MO

Description

Specifies the name of the SWF file to be loaded. Applies to the object tag only.

 

classid attribute

TOP

Value

clsid:d27cdb6e-ae6d-11cf-96b8-444553540000

Description

Identifies the ActiveX control for the browser. The value must be entered exactly as shown. Applies to the object tag only.

 

width attribute

TOP

Value

n or n%

Template variable: $WI

Description

Specifies the width of the application either in pixels or as a percentage of the browser window.

 

height attribute

TOP

Value

n or n%

Template variable: $HE

Description

Specifies the height of the application either in pixels or as a percentage of the browser window.

NOTE :Because Flash applications are scalable, quality doesn't degrade at different sizes if the aspect ratio is maintained. (For example, the following sizes all have a 4:3 aspect ratio: 640 x 480 pixels, 320 x 240 pixels, and 240 x 180 pixels.)

 

swliveconnect attribute

TOP

Value

true | false

Description

(Optional) Specifies whether the browser should start Java when loading Flash Player for the first time. The default value is false if this attribute is omitted. If you use JavaScript and Flash on the same page, Java must be running for the fscommand() function to work. However, if you use JavaScript only for browser detection or another purpose unrelated to fscommand()actions, you can prevent Java from starting by setting SWLIVECONNECT to false. You can also force Java to start when you are not using JavaScript with Flash by explicitly setting the SWLIVECONNECT attribute to true. Starting Java substantially increases the time it takes to start a SWF file; set this tag to true only when necessary. Applies to the embed tag only.

Use the fscommand()action to start Java from a stand-alone projector file.

 

play attribute/parameter

TOP

Value

true | false

Template variable: $PL

Description

(Optional) Specifies whether the application begins playing immediately on loading in the web browser. If your Flash application is interactive, you might want to let the user initiate play by clicking a button or performing another task. In this case, set the play attribute to false to prevent the application from starting automatically. The default value is true if this attribute is omitted.

loop attribute/parameter

TOP

Value

true | false

Template variable: $LO

Description

(Optional) Specifies whether the Flash content repeats indefinitely or stops when it reaches the last frame. The default value is true if this attribute is omitted.

 

quality attribute/parameter

TOP

Value

low | medium | high | autolow | autohigh | best

Template variable: $QU

Description

(Optional) Specifies the level of anti-aliasing to be used when your application plays. Because anti-aliasing requires a faster processor to smooth each frame of the SWF file before it is rendered on the viewer's screen, select one of the following values based on whether your priority is speed or appearance:

Low favors playback speed over appearance and never uses anti-aliasing.

Autolow emphasizes speed at first but improves appearance whenever possible. Playback begins with anti-aliasing turned off. If Flash Player detects that the processor can handle it, anti-aliasing is turned on.

Autohigh emphasizes playback speed and appearance equally at first but sacrifices appearance for playback speed if necessary. Playback begins with anti-aliasing turned on. If the frame rate drops below the specified frame rate, anti-aliasing is turned off to improve playback speed. Use this setting to emulate the Antialias command in Flash (View > Preview Mode > Antialias).

Medium applies some anti-aliasing and does not smooth bitmaps. It produces a better quality than the Low setting but a lower quality than the High setting.

High favors appearance over playback speed and always applies anti-aliasing. If the SWF file does not contain animation, bitmaps are smoothed; if the SWF file has animation, bitmaps are not smoothed.

Best provides the best display quality and does not consider playback speed. All output is anti-aliased, and all bitmaps are smoothed.

The default value for quality is high if this attribute is omitted.

bgcolor attribute/parameter

TOP

Value

#RRGGBB (hexadecimal RGB value)

Template variable: $BG

Description

(Optional) Specifies the background color of the application. Use this attribute to override the background color setting specified in the Flash SWF file. This attribute does not affect the background color of the HTML page.

 

scale attribute/parameter

TOP

Value

showall | noborder | exactfit

Template variable: $SC

Description

(Optional) Defines how the application is placed within the browser window when width and height values are percentages.

Showall (Default) makes the entire Flash content visible in the specified area without distortion while maintaining the original aspect ratio of the application. Borders can appear on two sides of the application.

Noborder scales the Flash content to fill the specified area, without distortion but possibly with some cropping, while maintaining the original aspect ratio of the application.

Exactfit makes the entire Flash content visible in the specified area without trying to preserve the original aspect ratio. Distortion can occur.

The default value is showall if this attribute is omitted (and width and height values are percentages).

 

align attribute

TOP

Value

Default | L | R | T | B

Template variable: $HA

Description

Specifies the align value for the object, embed, and img tags and determines how the Flash SWF file is positioned within the browser window.

Default centers the application in the browser window and crops edges if the browser window is smaller than the application.

L, R, T, and B align the application along the left, right, top, and bottom edge, respectively, of the browser window and crop the remaining three sides as needed.

 

salign parameter

TOP

Value

L | R | T | B | TL | TR | BL | BR

Template variable: $SA

Description

(Optional) Specifies where a scaled Flash SWF file is positioned within the area defined by the width and height settings. For more information about these conditions, see scale attribute/parameter.

L, R, T, and B align the application along the left, right, top or bottom edge, respectively, of the browser window and crop the remaining three sides as needed.

TL and TR align the application to the top left and top right corner, respectively, of the browser window and crop the bottom and remaining right or left side as needed.

BL and BR align the application to the bottom left and bottom right corner, respectively, of the browser window and crop the top and remaining right or left side as needed.

If this attribute is omitted, the Flash content is centered in the browser window.

 

base attribute

TOP

Value

base directory or URL

Description

(Optional) Specifies the base directory or URL used to resolve all relative path statements in the Flash SWF file. This attribute is helpful when your SWF files are kept in a different folder from your other files.

 

wmode attribute/parameter

TOP

Value

true | false

Template variable: $ME

Description

(Optional) Specifies what type of menu appears when the viewer right-clicks (Windows) or Command-clicks (Macintosh) the application area in the browser.

true shows the full menu, which gives the user several options to enhance or control playback.

false shows a menu that contains only the About Macromedia Flash Player 6 option and the Settings option.

The default value is true if this attribute is omitted.

 

wmode attribute/parameter

TOP

Value

Window | Opaque | Transparent

Template variable: $WM

Description

(Optional) Lets you use the transparent Flash content, absolute positioning, and layering capabilities available in Internet Explorer 4.0. This attribute/parameter works only in Windows with the Flash Player ActiveX control.

Window plays the application in its own rectangular window on a web page. Window indicates that the Flash application has no interaction with HTML layers and is always the topmost item.

Opaque makes the application hide everything behind it on the page.

Transparent makes the background of the HTML page show through all the transparent portions of the application and can slow animation performance.

Opaque windowless and Transparent windowless both interact with HTML layers, letting layers above the SWF file block out the application. The difference between the two is that Transparent allows transparency so that HTML layers below the SWF file might show through if a section of the SWF file has transparency; opaque does not.

The default value is Window if this attribute is omitted. Applies to object only.

 

allowscriptaccess attribute/parameter

TOP

Value

always | never | samedomain

Description

Use allowscriptaccess to let your Flash application communicate with the HTML page hosting it. This is required because fscommand() and getURL() operations can cause JavaScript to use the permissions of the HTML page, which can be different from the permissions of your Flash application. This has important implications for cross-domain security.

always permits scripting operations at all times.

never forbids all scripting operations.

samedomain permits scripting operations only if the Flash application is from the same domain as the HTML page.

The default value used by all HTML publish templates is samedomain.

 

SeamlessTabbing parameter

TOP

Value

true | false

Description

(Optional) Lets you set the ActiveX control to perform seamless tabbing, so that the user can tab out of a Flash application. This parameter works only in Windows with the Flash Player ActiveX control, version 7 and higher.

true (or omitted) sets the ActiveX control will perform seamless tabbing: after users tab through the Flash application, the next tab keypress will move the focus out of the Flash application and into the surrounding HTML content or to the browser status bar if there is nothing that can have focus in the HTML following the Flash application.

false sets the ActiveX control to behave as it did in version 6 and earlier: After users tab through the Flash application, the next tab keypress will wrap the focus around to the beginning of the Flash application. In this mode, the focus cannot be advanced past the Flash application by using the tab key.

 

Previewing the publishing format and settings

TOP

To preview your Flash SWF file with your specified publishing format and settings, you can use the Publish Preview command. This command exports the file and opens the preview in the default browser. If you preview a QuickTime video, Publish Preview starts the QuickTime video Player. If you preview a projector, Flash starts the projector.

To preview a file with the Publish Preview command:

  1. Define the file's export options using the Publish Settings dialog box.

  2. Select File > Publish Preview, and from the submenu, select the file format you want to preview.

Using the current Publish Settings values, Flash creates a file of the specified type(s) in the same location as the FLA file. This file remains in this location until you overwrite or delete it.

 

Using Flash Player

TOP

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

You can control Flash content in Flash Player using menu commands and the fscommand() function. For example, to make Flash Player take over the entire screen, you assign fscommand() to a frame or button and select the fullscreen command with the true parameter.

You can also print Flash content frames using the Flash Player context menu.

To control applications from Flash Player:

  • Do one of the following:

    • Open a new or existing file by selecting File > New or File > Open.

    • Change your view of the application by selecting View > Magnification, and from the submenu, select Show All, Zoom In, Zoom Out, or 100%.

    • Control Flash content playback by selecting Control > Play, Rewind, or Loop.

 

About configuring a web server for Flash

TOP

When your files are accessed from a web server, the server must properly identify them 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 Flash 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, webmaster, or server administrator to add the MIME type information.

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

 

Copyright ADOBE - All Rights Reserved Worldwide

 

 

More Topics:

Working with Flash Documents

How to work in Flash WorkSpace

Working with Projects in Flash

Process to Build your First Application in Flash

Using Symbols, Instances and Library Assets in Flash

How to Build Video Player in Flash

How to Work with Color, Strokes and Fills in Flash

How to Create Document in Flash

What is Vector and Bitmap Graphics in Flash

How to Create a Banner in Flash, Part 1

How to Work with Text in Flash

How to Create a Banner in Flash, Part 2

How to Use Imported Artwork in Flash

How to Create a Banner in Flash, Part 3

How to Work with Graphic Objects in Flash

How to Work with Layers in Flash

How to Use Filters and Blends

Working with Graphics in Flash

What is Accessibility Features in Flash

How to Create Motion (Shape Tween & Motion Tween) in Flash

How to Create an Application in Flash

What is Masking in Flash

How to Work with Video in Flash

How to Use Layout Tools in Flash

What are Behaviors in Flash

How to Work with Sound in Flash

How to Create Symbols and Instances in Flash

What is ActionScript in Flash

How to Write ActionScript With Script Assist in Flash

How to Add Button Animation and Navigation in Flash

What is Data Integration in Flash

How to Work with Screens

How to Create a Presentation with Screens

What is Extending Flash

How to Create Multilanguage Text in Flash

How to Create Graphics: Draw in Flash

What is Flash Lite

Ways of Data Integration

How to Create Graphics: Create a Timeline Animation in Flash

Getting Started with Flash Lite in Flash

How to Publish Flash Documents

How to Create Graphics: Making Animations with Easing

Learning Flash Lite 1.X ActionScript in Flash

How to Export Flash Content and Images from Flash

How to Create Graphics: Applying Gradients in Flash

Process of Writing and Editing ActionScript 2.0 in Flash

How to Create Accessible Content in Flash

How to Create Graphics: Apply Graphic Filters and Blends

What is Data and Data Types in Flash

Process of Printing from SWF Files in Flash

Using ActionScript: How to Use Script Assist mode in Flash

Learn Syntax and Language Fundamentals in Flash

How to Create E-learning Content in Flash

Using ActionScript: How to Write Scripts in Flash

Working with Functions and Methods in Flash

Process of Using Templates in Flash

Using ActionScript: Process of Adding Interactivity in Flash

What are Classes in Flash

Control Tag Summary of XML to UI in Flash

Using ActionScript: How to Create a Form with Conditional Logic and Send Data in Flash

What is Inheritance in Flash

What is Data Integration: Overview

Using ActionScript: How to Work with Objects and Classes in Flash

Overview on Interfaces in Flash

What is Data Integration: Using XML for a Timesheet

How to Work with Text and Strings in Flash

How to use Handling Events in Flash

What is Data Integration: Using XUpdate to Update the Timesheet

Learning Animation, Filters and Drawings in Flash

How to Work with Movie Clips in Flash

How to Create Interaction with ActionScript in Flash

How to Work with Images, Sound, and Video in Flash

How to Work with External Data in Flash

What is Security in Flash

How to Debug Applications in Flash

List of Error Messages in Flash

Using Object-Oriented Programming with ActionScript 1.0 in Flash

How to Write Scripts for Earlier Versions of Flash Player in Flash

List of all Keyboard Keys and Key Code Values for using in Flash

Terminology

Introduction to Components in Flash

What are Components in Flash

How to Create an Application with Components

How to Work with Components in Flash

How to Handle Component Events in Flash

How to Customize Components in Flash

How to Create Components in Flash

What is Collection Properties in Flash