Create a transparent background in a SWF fileProducts affected
What's covered
The background color (Stage color) of a SWF file can be set to transparent. The background color or image of the HTML page that contains the SWF file shows through. This technique allows layering of SWF content with DHTML (Dynamic HTML) content.
Not every web browser handles transparency in the same way. Be sure to test your SWF file in all browsers that you want to enable your audience to use. Most Linux browsers do not support Flash transparency. This table lists several browsers that support transparency.
Using the Publish Settings in Flash Professional
The HTML for a SWF file can be created using the Publish Settings feature in Flash. The Publish Settings dialog box provides an option to affect the WMODE setting. The options selected in the Publish Settings are added to the HTML source code automatically.
- Choose File > Publish Settings. Make sure that HTML is selected.
- Select HTML.
- Choose Transparent Windowless from the Window Mode menu to make the SWF file's background disappear in browsers that support this feature.
- Publish the document.
This video shows how to perform these steps in Flash Professional:
Content on this page requires a newer version of Adobe Flash Player.![]()
Using the Properties panel in Dreamweaver
Follow the steps below, and Dreamweaver inserts the correct HTML code automatically.
- In Dreamweaver, insert the SWF file into an HTML page.
- Select the SWF file in the Design View.
- In the Properties panel, choose Parameters.
- For the Parameter, enter "wmode" (without quotes). For the Value, enter "transparent."
- Save the document. The HTML page is complete.
This video shows how to perform these steps in Dreamweaver:
Content on this page requires a newer version of Adobe Flash Player.![]()
Editing the HTML code manually
To edit an existing HTML page, add the WMODE parameters to the HTML code.
Add the following parameter to the OBJECT tag:
<param name="wmode" value="transparent">
For more information about editing HTML tags manually for SWF content, see Object Tag Syntax.
Related content
Flash content displays on top of all DHTML layers (tn_15523)
Keywords: WMODE; transparency; transparent; alpha; display; background color; movie properties
Doc ID
(tn_14201)
Last updated
2011-10-17
Products affected
