I have a flash file that I want to embed on a webpage, however, I want it to load when the user clicks on it (which will run the preloader) – (like clicking play on a youtube video)
It’s one flash file that loads in XML data and is graphically heavy.
I’m not sure if the only way to do it is to load the flash file through another swf, i.e., flash container -> click flash container to load flash file with preloader.
Any suggestions?
My first impulse would be to use an image or explicitly-sized DOM element as a placeholder and some Javascript to swap in the Flash applet on-click. That’d be guaranteed to solve your loading issue as well as deferring the overhead of starting the flash player. (Which would make users who think like me but don’t know about FlashBlock happy)
With jQuery, it’d just be something like
…and on-hover behaviour with something like opacity animation is also trivial.