Getting a Flash movie to have a transparent background

John Carney
John Carney used Ask the Experts™
on
I've asked this before but I still can't seem to get it. How do I make a flash movie transparent? This one begins with the white background visible for a split second. The CSS background is a gradient so I need a flash movie that is completely transparent. In Flash, I set my HTML window mode to Transparent Windowless. What do I do, either in Flash or the HTML to get it to be transparent?

Thanks,
John
HTML:
  <script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','250','height','333','title','Did U?','src','DidYouHaveToBeSoBeautiful','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','DidYouHaveToBeSoBeautiful' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="250" height="333" title="Did U?">
  <param name="movie" value="DidYouHaveToBeSoBeautiful.swf"/>
  <param name="quality" value="high" />
  <embed src="DidYouHaveToBeSoBeautiful.swf" mode="transparent"/ quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="250" height="333"></embed>
</object>
</noscript>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
_root["Background_Name_Here"]._visible = false;

// And then when you want it to be visible again

update(){
_root["Background_Name_Here"]._visible = true;
}
John CarneyReliability Business Tools Analyst II

Author

Commented:
Hi a0vanc01, thanks for posting but I don't understand. The background that's visible momentarily on the web page doesn't have a name. It's whatever color the background for the flash project is. "No color" is not an option as far as I can tell.
Assuming we can get past that hurdle, where would this script go? Would the first line be a frame action on frame 1? I wouldn't want the required project background color to ever show through, so I would never use the second line.
Apologies for my density here.
Thanks,
John
Hi,
It is wmode and not just mode.
Also need to add a param tag with that too.
<param name="wmode" value="transparent" />

Warm Regards
Deepanjan Das
http://deepanjandas.wordpress.com
Should you be charging more for IT Services?

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

John CarneyReliability Business Tools Analyst II

Author

Commented:
Hi deepanjandas, I was sure that that would do it, but it still doesn't work. So I fooled around with the flash file and somehow made it so that the white background stays visible until the image fades in. Please take a look at both the web page (http://www.xkwizit.biz/MySongs/Beautiful/TransparencyIssue.html) and the attached .fla

Thanks,
John

DidYouHaveToBeSoBeautiful.fla
Hi,
You missed the wmode attribute in embed tag :

<embed src="DidYouHaveToBeSoBeautiful.swf" wmode="transparent" ...

Warm Regards
Deepanjan Das
http://deepanjandas.wordpress.com
John CarneyReliability Business Tools Analyst II

Author

Commented:
Hi Deepanjan Das, it still doesn't work for me, I feel like an idiot. Could you create a new html with the change and post it so I can see it working properly? Are you sure there's not something I have to chnage in the .fla?

Thanks,
John
Hello John,
It worked for me, find the html attached.

Warm Regards
Deepanjan Das
http://deepanjandas.wordpress.com
proj.zip
John CarneyReliability Business Tools Analyst II

Author

Commented:
Thanks Deepanjan Das, I can see that it does indeed work. :-)  I've been comparing your html scripts with mine and I'm wondering which of the differences are critical. I'm guessing you did something in Flash to output the different code. Could you please post your modification of my .FLA so that I can see what you did there? Whatever it is, I need to know how to set my publish settings in Flash so I'll know how to do this in the future.

Thanks!
John
Hi John, I did no change in FLA, just opened it in CS4 and published it in default settings.
Cheers!

Warm Regards
Deepanjan Das
http://deepanjandas.wordpress.com
John CarneyReliability Business Tools Analyst II

Author

Commented:
Thanks, deepanjan das. It always amazes me how one days omething doesn't work, and then the next day it does! Obviously I think that when I was trying to add the transparency attributes manually, I must have missed a comma or two.

Thanks so much.

John

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial