Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

swf to unload itslf after a certain time

8:20 pm on Oct 23, 2009 (gmt 0)

New User

5+ Year Member

joined:Oct 13, 2009
votes: 0

I want to insert a swf in html file.But that swf should be appeared for first 10 second after loading the html file.then it will disappeared.I made it in flash by making the end frame's alpha=0.But In html the the color of the stage of the swf stays.How can i fix this.Any help would be gratly appreciated.Thanks.
9:41 pm on Oct 23, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Aug 29, 2006
votes: 0

Alpha properties can only be applied to symbols (not to frames).

Assuming you have made all assets on the final frame transparent (or removed them altogether) and placed a stop(); action in the timeline then what you are seeing is the background colour for the Flash file as specified in your HTML.

Make it the same colour as the surrounding background in your HTML.

Object: param name="bgcolor" value="#ffffff"
Embed: bgcolor="#ffffff"


3:11 pm on Oct 24, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
votes: 0

If you're using the old-school <object><embed> method, you should be able to do

<object width="550" height="400">
<param name="movie" value="file.swf">
<param name="wmode" value="transparent">
<embed src="file.swf" width="550" height="400" wmode="transparent"></embed>

Using SWFObject (better,)

<script src="swfobject.js" type="text/javascript"></script>
<script type="text/javascript">
var myvideo = new SWFObject('file.swf', 'flash-obj-id', '550', '400', '6', '#ffffff');
flash-obj-id.addParam("wmode", "transparent");
window.onload = function() {
if (document.getElementById('document-obj-id')) { flash-obj-id.write('document-obj-id'); }

Transparent works out better in the long run, because unless you are using web-safe colors, you will see some differences in how various browsers and Flash interpolate the same color assignments. Sometimes the same assignment color will shift between the browser and Flash.

5:36 am on Oct 28, 2009 (gmt 0)

New User

5+ Year Member

joined:Oct 13, 2009
votes: 0

Thanks.Its working!

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members