No, you can't do that only with swfobject. But, there are ways to accomplish 
it. There's a library I wrote which wraps up swfobject and gives it extra 
functionality, called CheckPlayer (http://checkplayer.flensed.com) that can 
do this.

Basically, you'd do something like this:
1. Create a container for your alternate content, make it visible by default
2. Create a container for your SWF, and position/overlay it on top of the 
alternate content
3. Fire off the "DoSWF()" function of CheckPlayer, targetting that 
container, and use the callback to be notified of SWF events:
    a. When you get the "SWF_INIT" event, move the container off the page so 
its loading progress is not visible.
    b. Then, when you get the "SWF_LOADED" event, move the container back, 
and hide the alternate content.

As for the last part, about detecting the end of the playing. That part you 
will need to roll your own solution for. I'm not aware of any events or JS 
interface functions that you can use to trap the end of a SWF. You'd 
probably need for the SWF to signal out to the javascript using 
ExternalInterface or fscommand that it was complete. And at that point, you 
could hide the SWF and redisplay the alt content.

It's obviously a more complicated pattern, and not something that is 
normally attempted by most swfobject users. But it's doable, and that's why 
I wrapped up the more advanced capabilities into CheckPlayer, for the few 
who are brave enough to try! :)

DISCLAIMER: I haven't updated CheckPlayer to use v2.2 yet, it still uses 
2.1. An update for 2.2 is coming, but there's still issues to work out on 
the integration.

--Kyle




--------------------------------------------------
From: "iamklein" <[email protected]>
Sent: Thursday, August 06, 2009 1:21 AM
To: "SWFObject" <[email protected]>
Subject: Display Alternate Content while SWF loads to 100%

>
> This is my target behaviour:
>
> 1. While the swf file is loading to 100%, the swfobject displays the
> alternate content.
> 2. When the swf file has loaded to 100%, the alternate content is then
> replaced by the swf file.
> 3. After the swf file has played, the swfobject then displays the
> altenate content again.
>
> Is this possible just by using swfobject?
>
> If not, are there any means I can do this?
> >
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to