1

I have some text with transparent background and I imported this png image to flash. Now when I create a swf file, it doesnt show me transparency. I tried using wmode parameter as transparent in the webpage but that wont work. Stage of my flash file is of the same size as the png image with text in it. Can anybody please tell me how will I make the stage in swf transparent so that the file blends with the background showing on text and not any other color.

2
  • 1
    Can you comment about a possible solution which you may have found amongst the links that Jack offered? I'm curious.
    – horatio
    Jul 12, 2011 at 19:20
  • I can say I followed all the 3 options that were mentioned. I save the image as a 32 bit png, added embed and object tag attibutes and also made the HTML as windowless in flash publish settings option.
    – appuser
    Jul 13, 2011 at 14:23

4 Answers 4

1

my fellow designer faced the same issue with flash i dont remember what he did but i am dead sure he did the things within Code, and if your sure that your doing everything according to track so all you have to recheck twice possibly your missing something

Please give a look to this :

That first link helped my guy see if it can do something with your problem...

and in our project we used this code for the flash header

    <div id="flashcontainer">
    <script type="text/javascript">
     AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','900','height','253','src','flash2','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','wmode','transparent','movie','flash2' ); //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="900" height="253">
  <param name="movie" value="flash2.swf" />
  <param name="quality" value="high" />
  <param name="wmode" value="transparent" />
  <embed src="flash2.swf" width="900" height="253" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent"></embed>
</object>
</noscript>

On SE site you can find the same issue

hope this will help....

1

The secret to this is it's hidden among the Publish settings.

Under HTML, set the Window Mode dropdown to "Transparent Windowless." I was going to put up some screen grabs, but there's a video that shows the exact steps here: http://kb2.adobe.com/cps/524/cpsid_52418.html#flash.

3
  • I tried doing this but it doesnt work. It still shows me the background color.
    – appuser
    Jul 9, 2011 at 0:11
  • Hmm... it works in Flash CS3, 4 and 5 that I can test on here. Which version are you working with? Jul 10, 2011 at 5:51
  • @appuser are you also exporting the html and using that generated html to include the swf file?
    – kontur
    Feb 21, 2013 at 13:39
0

It sounds like you are doing it right, but http://kb2.adobe.com/cps/128/tn_12804.html says

This image must be saved as a 32-bit images[sic], preferably PNG for best color fidelity. Import the PNG file into Flash using File> Import and the alpha channel transparency will be retained in Flash.

Have you confirmed your source image is 32 bit? Note that I am unable to save a 32bit PNG image using Photoshop even with transparency (windows reports 24bit). While Fireworks can (windows reports 32bit)

4
  • yes my source image is 32 bit png file. And I imported it in flash uisng File>Import but I still get the background color in the swf.
    – appuser
    Jul 9, 2011 at 0:15
  • 1
    If you save the file as PNG-24 and then check transparency checkbox it adds 8 bit so in all if you view in the properties it saves it as a 32 bit png.
    – appuser
    Jul 9, 2011 at 0:36
  • 32 bit is RGBA (8 bits each for R, G and B, plus 8 bits for alpha). Jul 9, 2011 at 8:11
  • I know that BTW. The point is: for some reason windows reports the one file as 24 bit and the other as 32 bit. So there is a difference in the headers. If there is a difference, it can cause an issue. Note that the knowledge base article specifically mentions using Fireworks. I presume its marketing, but it could be for a technical reason.
    – horatio
    Jul 12, 2011 at 13:46
0

I have use this code below for html and php. And it works fine for me. maybe, you can try this out.

<p>
<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="300" height="160">
<param name="movie" value="directory/subfolder/flashname.swf">
<param name="quality" value="High">
<embed src="/directory/subfolder/flashname.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="300" height="160" wmode="transparent"></object>
</p>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.