Tutorials — How to make Flash (.swf) transparent
This tutorial will show you how to make a Flash movie (SWF) files with
a transparent background.
Browsers that support Flash Transparency
- Internet Explorer 3 or higher (Windows)
- Internet Explorer 5.1 or higher (Macintosh)*
- Netscape 7.0*
- Mozilla 1.0 or higher*
- Firefox*
- Safari
- AOL*
- CompuServe*
* Macromedia Flash Player version 6,0,65,0 (Windows) or 6,0,67,0 (Macintosh)
or higher required for this feature.
HTML Code
After you have your HTML page setup so it displays your Flash file, open
it up so you can view and edit the HTML code. You should see code similar
to the following to display the Flash file.
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
WIDTH="320" HEIGHT="240" id="MyMovieName">
<PARAM NAME=movie VALUE="MyFlashMovie.swf">
<PARAM NAME=quality VALUE="high">
<EMBED src="MyFlashMovie.swf" quality="high" WIDTH="320" HEIGHT="240"
NAME="MyMovieName" ALIGN="" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT> |
To make the background transparent, you will need to add the WMODE
parameters.
1. Add the following parameter to the OBJECT tag
|
|
<param name="wmode" value="transparent"> |
2. Add the following parameter to the EMBED tag.
Your HTML code should look similar to the following after adding the WMODE
parameters, where the changes are shown in red.
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase=";http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
WIDTH="320" HEIGHT="240" id="MyMovieName">
<PARAM NAME=movie VALUE="MyFlashMovie.swf">
<PARAM NAME=quality VALUE="high">
<PARAM NAME=wmode VALUE="transparent">
<EMBED src="MyFlashMovie.swf" quality="high" WMODE="transparent"
WIDTH="320" HEIGHT="240"
NAME="MyMovieName" ALIGN="" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT> |