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

Flash and Shockwave Forum

    
SWF Preloader in Internet Explorer
GGR_Web




msg:3845544
 1:03 pm on Feb 9, 2009 (gmt 0)

I have a simple flash animation with a preloader. This works in every browser I've tried except Internet Explorer. It seems to work if not catched but when veiwed again the preloader appears, does nothing and then remains in veiw once the main animation starts.

This is the html calling the preloader.

<embed src="images/preloader.swf" quality="high" bgcolor="#ffffff" width="414" height="260" name="preloader" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />

This is the loader code

loader.contentPath = "homepagebanner.swf";
pBar.source = loader;
pBar.setStyle("themeColor", "0x0000ff");
pBar.setStyle("color", "0x000000");
pBar.mode = "polled";

and this (attached to the pbar) tells it to go away.

on (complete) {
this.setVisible(false);
}

This actionscript 2 (as if you didn't know).
I imagine it looks antique, but you work with what you've got.

 

Samizdata




msg:3845564
 1:34 pm on Feb 9, 2009 (gmt 0)

I suspect it is the lack of <OBJECT> tags, which normally wrap around the <EMBED> tag.

I would advise using swfObject instead anyway, as it validates.

...

GGR_Web




msg:3845568
 1:40 pm on Feb 9, 2009 (gmt 0)

swfObject?

Not familiar with that.

Adding object tags hasn't fixed the problem.
The problem seems to occur on the first load and if the page loads slowly, or if the main swf loads very quickly.

[edited by: GGR_Web at 1:51 pm (utc) on Feb. 9, 2009]

Samizdata




msg:3845581
 1:58 pm on Feb 9, 2009 (gmt 0)

This is the kind of thing Flash itself spews out:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="550" height="400" id="test" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="test.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="test.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="test" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

Try adapting that.

Better, though, to use your favourite search engine to find swfObject.

...

GGR_Web




msg:3845630
 3:28 pm on Feb 9, 2009 (gmt 0)

I've tried both approaches and neither so far neither have given very decent results.

I can't believe there isn't a more robust solution. I mean, this is just a pain for a pretty trival problem.

phranque




msg:3846352
 1:07 pm on Feb 10, 2009 (gmt 0)

swfobject - Google Code [code.google.com]

Samizdata




msg:3846366
 1:41 pm on Feb 10, 2009 (gmt 0)

This works in every browser I've tried except Internet Explorer.

As it is a browser-specific problem I don't know what else to suggest.

I have never known ActionScript (any version) or its predecessor to behave differently in different browsers, as long as the Flash Player is properly invoked from the HTML.

Perhaps re-installing the Flash Player may solve your IE problem?

...

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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved