I have a movie which is embedded in my flash timeline so that I can scroll through it frame by frame using a scrollbar class I created. However, because the movie is about 10mb, I need to have some sort of preloader, either in HTML5 or in flash, to display a poster image or something until the movie is loaded. I’ve loaded movie clips dynamically using a preloader, but how do I do this when the movie clip is embedded in the timeline? I tried a $(window).ready function to hide the poster image on window ready, because I thought that this doesn’t fire until all your assets are loaded, but I guess that doesn’t work with flash, so I guess I’m going to have to do it within flash.
Share
On the main movieclip (on the main timeline) you should add first empty frame (it should be lightweight and load fast). Then you should stop(); the MovieClip. After it is stopped you may continuously check loaderInfo.bytesLoaded/loaderInfo.bytesLoaded properties and display percentage of the loading process.
This snippet may help (you may place this code into first frame of timeline, or into Main class constructor method):