Flash Script – Create a Transparent Flash Movie


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!

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

No Reader comments

Comments on this post are closed.