Reputation: 1
I have preloader code in my main FLA, and I load the corresponding preloader (a small file) externally. When I detect that the file is fully loaded, I need to add the listener to the content that I want to "preload".
function swfLoadedHandler(e:Event):void {
preloader_movie = MovieClip(preloader_carregador.content);
loaderInfo.addEventListener(ProgressEvent.PROGRESS, update);
}
If I use it this way, the loaderInfo
listener does not work, but if I add the listener ouside of the handler function, it does.
The problem is, I need it to work from within the complete handler, because obviously, the preloaded can show the % completed only after it's loaded...
Upvotes: 0
Views: 531
Reputation: 6847
It is better if you show more code. But it seems that loaderInfo doesn't send PROGRESS event after file was loaded and as result update handler wasn't called.
Here you see more about file loading
Upvotes: 1