homepage Welcome to WebmasterWorld Guest from 54.211.50.5
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

    
swf to unload itslf after a certain time
kingkol




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

hi,
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.

 

Samizdata




msg:4012429
 9:41 pm on Oct 23, 2009 (gmt 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"

...

rocknbil




msg:4012728
 3:11 pm on Oct 24, 2009 (gmt 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>
</object>

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'); }
};
</script>

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.

kingkol




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

Thanks.Its working!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved