First white screen(flashes for 0.5s) then SWFObject background-color(0.5s) and only then movie starts.

52 views
Skip to first unread message

Finer

unread,
Jul 8, 2008, 9:28:49 AM7/8/08
to SWFObject
First white screen(flashes for 0.5s) then SWFObject background-
color(0.5s) and only then movie starts...
That effect happens only after page reloading.
here is the code:
<div id="container"><img src="App_Themes/service.jpg" /></div>
<script type="text/javascript" src="swfobject.debug.js"></script>
<script type="text/javascript">
var s1 = new SWFObject("App_Themes/
flvplayer.swf","ply","328","200","8","#AAAAAA");
s1.addParam("flashvars","FLVUrl=service.flv");
s1.write("container");
</script>

How to make the movie start directly after alternative content???

I use SWFObject 1.5.

Thank you in advance

Aran Rhee

unread,
Jul 8, 2008, 9:19:10 PM7/8/08
to swfo...@googlegroups.com
1) move your <script type="text/javascript"
src="swfobject.debug.js"></script> in to the head area. (BTW, is
swfobject.debug.js some special version?)

2) how big is service.jpg? You may want to detect if the user has flash, and
if not THEN load the jpg (as otherwise you are potentially laoding a jpg and
delaying the swf loading time)

3) Do you have a prelaoder on your flvplayer.swf / how big is flvplayer.swf?

Aran

Finer

unread,
Jul 9, 2008, 5:39:26 AM7/9/08
to SWFObject
Thank's for your reply =)

1) Unfortunately I can't place javascript code into the head area,
because I have ASP.NET web control that has its client behaviour in
the separate js file (there I do define SWFObject).
swfobject.debug.js is a renamed swfobject.js file with
"Sys.Application.notifyScriptLoaded();" string at the end.

2) that's true, thanks)) and if the user has flash, so only flash
loads?? and alternate content doesn's, does it??

3) flash player is 63 KB and it starts playing only when it loads the
whole "service.flv" (1.2 MB) file.

Aran Rhee

unread,
Jul 10, 2008, 12:09:31 AM7/10/08
to swfo...@googlegroups.com
1) Ok. I think this should still be fine. If it is working for you in your
testing then...

2) So you need to change the way the logic of the code works a bit.
Something like the below should work:

if (swfobject.hasFlashPlayerVersion("9.0.18"))
{
// has Flash
// call embedSWF() etc
}
else
{
// no Flash
// write jpg to DIV etc
}

Example implementation:
http://www.swffix.org/swfobject/testsuite/test_api_hasflashplayerversion.htm
l

3) As long as you have a preloader / have optimised to start showing some
content to users on 1st loading of the player, I don;t see an issue.


Aran


-----Original Message-----
From: swfo...@googlegroups.com [mailto:swfo...@googlegroups.com] On
Behalf Of Finer
Sent: Wednesday, 9 July 2008 7:39 PM
To: SWFObject
Subject: Re: First white screen(flashes for 0.5s) then SWFObject
background-color(0.5s) and only then movie starts.

Finer

unread,
Jul 17, 2008, 6:21:18 AM7/17/08
to SWFObject
Thank you, Aran, very much for your help.

1) I've updated the library to 2 version, and it seems that the
problem doesn't exist anymore.
Reply all
Reply to author
Forward
0 new messages