MovieClipLoader class
- Started
- Last post
- 6 Responses
- CyBrain
Does anyone ever have problems with onLoadComplete ?
Seems like it only waits until about 80% of the movie is done preloading sometimes. Other times it works fine. I get this problem testing in Flash and while loading in Firefox 2.0 on the Mac.
I'm publishing Flash 7, AS2.
- enjine0
try using onLoadInit()
- CyBrain0
Am I correct in assuming that onLoadInit() will play the movie only when the actions on the first frame of the loaded clip have been executed, but NOT THE WHOLE MOVIE.
I have to have the whole movie loaded because there are buttons that will advance to the end of that timeline that would create some other problems.
- enjine0
yes, the event fires when the actions on the first frame have been executed.
i'm not sure if the entire movie will have been loaded by that point, though i had always assumed it would.
honestly, i only use the moviecliploader class for images and i write my own preloaders for swfs.
you can always set/check/update a variable to see if onLoadComplete has fired by the time onLoadInit has fired and vice versa.
- caseyc0
From the Flash documentation for onLoadComplete:
"In most situations, it's better to use the onLoadInit event instead, which is called after the content is loaded and fully initialized."
- CyBrain0
Thanks caseyc, I'll try that.
- CyBrain0
Looks like onLoadComplete is working better in my case. I don't know what the problem was before, but it went away somehow.