wood burning stoves
The moose likes HTML, CSS and JavaScript and the fly likes Javascript preloader for .swf files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Javascript preloader for .swf files" Watch "Javascript preloader for .swf files" New topic

Javascript preloader for .swf files

Deivis Vukas

Joined: Sep 07, 2003
Posts: 4
I have a html document with embeded flash movie inside <object> element.
Is it possible to show initial html page with a message "Loading..." while .swf file loading completes, then switch to the next html page with my flash movie ready to run,
to run litle animated gif instead of object element, while .swf file is loading?
Can you explain in details how to write javascript code to serve this task?
Thank you!
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Flash file contain their own mechanism for showing the 'Loading...' text.
Since a Flash file is streaming (it can start running before it completes downloading), you have the first few frames have a repeating loop checking to see if the whole file has loaded and going back the beginning if it hasn't.
I agree. Here's the link: http://aspose.com/file-tools
subject: Javascript preloader for .swf files
It's not a secret anymore!