Welcome to WebmasterWorld Guest from 54.234.38.8

Forum Moderators: open

Message Too Old, No Replies

SWF Preloader in Internet Explorer

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

Junior Member

5+ Year Member

joined:Oct 1, 2008
posts:86
votes: 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.

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

Senior Member

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

joined:Aug 29, 2006
posts:1312
votes: 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.

...

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

Junior Member

5+ Year Member

joined:Oct 1, 2008
posts:86
votes: 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]

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

Senior Member

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

joined:Aug 29, 2006
posts:1312
votes: 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.

...

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

Junior Member

5+ Year Member

joined:Oct 1, 2008
posts:86
votes: 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.

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

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10542
votes: 8


swfobject - Google Code [code.google.com]
1:41 pm on Feb 10, 2009 (gmt 0)

Senior Member

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

joined:Aug 29, 2006
posts:1312
votes: 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?

...