Transparent Flash backgrounds

Home Food Mates • Members Tutorials Forum Buy Templates Contact Us 

 


Flash Tutorials

   

Flash Tutorial - Creating Transparent Flash Movies

 

Access: Free Tutorial

Learn how to create transparent Flash Movies and how to change the background colour of a Flash Movie via the HTML. You can see that this page has a textured paper background effect. Any Flash Movie that I place on this page with the background set to transparent will also have the same paper background.

You will notice in the example below that the Movie sometimes has a transparent background and sometimes not. The black background is just a graphic symbol which fades and animates in and out reveling the transparent background. Try placing your Mouse over the top of the Movie. You will see a rollover effect which will make the Movie immediately go transparent.

Example: Download the Flash and HTML file Beg 027a


Roll your Mouse over this file to make it go transparent.




The very same Movie without the background set to transparent.


Creating a Flash Movie with a Transparent Background

  1. Create a: Flash Movie
  2. Place your Movie on a: Web Page
  3. Cross Reference: If you do not know how to do this see the tutorial on: Publishing a Flash Movie

  4. Open your normal web editor and go to code view so that you can see the: HTML
  5. Look for the code that embeds the Flash Movie. It will look similar to this:

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="300" height="210">
    <param name="movie" value="webwasp-logo.swf" />
    <param name=quality value=high />
    <embed src="webwasp-logo.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="300" height="210"></embed>
    </object>


  6. You need to add the lines that are in red:
  7. <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="300" height="210">
    <param name="wmode" value="transparent" />
    <param name="movie" value="webwasp-logo.swf" />
    <param name=quality value=high />
    <embed src="webwasp-logo.swf"
    wmode="transparent" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="300" height="210"></embed>
    </object>


    Note: You will see several tags that start <param name= something />. Place your line of code in the same section as the other param name tags. The order of the param tags does not seem to matter.

    The wmode="transparent" should go inside the
    embed tag as above.

  8. To test your Movie you will need to view it in a Browser like Internet Explorer. It will not be visible in web editors such as Dreamweaver. So save your file and re-open in your web Browser.


Compatibility Issues

I have tested this in latest versions of Internet Explorer, Firefox and Netscape using Windows XP. It should also work in Mac OS X and up.

This effect may not work in older browsers or if the Flash Player is old. The following Browsers currently support transparency:

Internet Explorer 3.0 & up (Windows)
Internet Explorer 5.1* & 5.2* (Mac)
Netscape 7.0*
Mozilla 1.0*
CompuServe*
AOL*

* Flash Player 6 or higher is needed.

In windowless mode performance maybe slow so if speed is important consider alternatives. Transparent backgrounds are not possible in a Flash standalone projector.


Background Colour

It is worth knowing that this same technique can be used to change the background colour of a Flash Movie. This should override the default setting used in the Flash Movie:


Rollover the image to see the new background colour.

To apply an alternative background colour use the following tags as above:



That's all there is to it. Enjoy!!


Please indicate what you thought of this tutorial 
10 is the best: 
10 9 8 7 6 5 4 3 2 1


Webwasp Community: Webwasp Mates & Dates

Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates

 Top of Page Home Food Mates Members Tutorials Forum Buy Templates Contact Us 
 All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.