Hi. There is no SWFObject API method to preload a swf file.
However, I can think of a few ways to do it: a) Use ExternalInterface to call a js method from the swf with load progress and/or a final load finished event. When the load is complete, run some logic to resize / show your swf. pros - you have complete control over what you want the page to know about from your flash file cons - you have to add the ExternalINterface code to your swf (not hard, but still has to be done) b) Use the old direct javascript communucation api methods on the swf <object>. Specifically PercentLoaded(). You could first set the swf files with width and height as 1px, use the document.flashObj.PercentLoaded(); method to monitor the loading process. Once the flash is fully loaded, you can resize it to it's normal size. See more here: http://www.adobe.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03.html pros - no code to add to your swf cons - PercentLoaded() (and the rest of the original js api methods) are really old, and I not sure if all browsers hnalde them in the same way. Some thorough testing would be required. Cheers, Aran On Fri, Apr 9, 2010 at 4:10 AM, therake <[email protected]> wrote: > Hi there. Thanks for all the great javascript! > > I'm wondering if there is a way to use swfobject or swfobject with > some other javascript as a preloader. That is, I'm tired of dealing > with swf preloaders and a javascript solution seems like the way to > go. I'm hoping that I can show a small loading gif or some text until > the very moment the main swf is ready to be viewed. > > The swfwobject method's I've found seem to fire when the main swf is > embedded and starting to load but not when the load completes. > > Hope this makes sense! > > Thanks. > > -- > 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]<swfobject%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/swfobject?hl=en. > > -- 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.
