type = 'application/x-shockwave-flash'
data = 'http://sitepointstatic.com/flash/transparent.swf'
width = '400'
height = '400'
bgcolor = 'black'
>

The background of a Flash movie can be set to display as transparent.

The swf file on the left is not transparent. The swf file on right is set to transparent. This script works only in IE 3.0 and above. It does not work in Netscape.

Transparency allows the background color or image of the HTML page that contains the Flash movie to show through.

To make a transparent movie is very simple. Just add the wmode attribute and set it to transparent, as below.

<EMBED src=transparent.swf width=120 height=30 type="text/html;  
charset=iso-8859-1" bgcolor="#000000" wmode="transparent"  
quality="high"> </EMBED>

Download the sample files here.

Simple!

Georgina Laidlaw
Georgina has more than fifteen years' experience writing and editing for web, print and voice. With a background in marketing and a passion for words, the time Georgina spent with companies like Sausage Software and sitepoint.com cemented her lasting interest in the media, persuasion, and communications culture.

No Reader comments

Related books & courses
Available now on SitePoint Premium

Preview for $1