|
From: SherwoodClark on 8 Mar 2006 10:17 I'm trying to create a preloader for a movieclip. I have the preloader as its own SWF file and then I call the LoadClip() method of the MovieClipLoader class to load the final SWF on _level2 in the main timeline of the preloader. I don't want to load the final SWF into a movieclip or use the Loader component, because I'm using v2 components that won't work in this scenario (i.e. Alert, comboBox, and others). The first frame of the final SWF is blank and has a stop() action in it. Once the final SWF is loaded, determined by the onLoadComplete event of the MovieClipLoader, I send the playhead of the final SWF to frame 2 where the image is. The code looks like: var mcLoader:MovieClipLoader = new MovieClipLoader(); mcLoader.loadClip("rfqFormToImport.swf",2); //Loads rfqFormToImport.swf on _level2 in preloader timeline loadtest = new Object(); loadtest.onLoadComplete = function(eventObject){ _level2.gotoAndStop(2) } mcLoader.addListener(loadtest); This all works fine. The preloader loads the final SWF and moves the playhead to frame 2 once loaded. Now, the whole purpose of this was to have a progressBar component in frame one of the preloader.swf to track the loading of the final swf. I thought the progressBar.source could be set to mcLoader and it would track the progress of the MovieClipLoader, so I added the following code (I have a progressBar instance named theProgressBar on the stage): theProgressBar.source = mcLoader; theProgressBar.mode = "event"; // I tried both "event" and "polled" neither works. The progressBar does not show the status of the MovieClipLoader when I'm trying to load a SWF file to a level. So, I tried to do it manually, but I can't getBytesLoaded of _level2 until the entire final SWF is loaded. Is there any way to do what I want to do, which is: 1. Have a preloader.swf 2. That has a progress indicator in frame one either custom or the progressBar component 3. Have the preloader.swf start loading an external Final.swf on _level2 in frame one 4. Track the progress of the load of the final.swf with the progress indicator. Thanks in advance for the HELP!
|
Pages: 1 Prev: Firefox and MM_controlShockwave Next: Hide button partially |