Skip to main content
Participating Frequently
May 6, 2006
Answered

myListener.onLoad

I am using Flash MX2004Pro, and have come across something that is driving me bonkers.

I have a preloader set up, and it seems to be working correctly, however, once it is done, and the page in question comes up, the image for the preloader is not vanishing, rather it is sitting behind the image, though still visible.

my code is:

var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener bject = new Object();

MyMCL.addListener(myListener);

myListener.onLoadProgress = function (target_mc, loadedBytes, totalBytes) {
_level50._visible = true;
var preloadPercent:Number = Math.round((loadedBytes / totalBytes) * 100);
_level50.preloader.gotoAndStop(preloadPercent);
}

myListener.onLoadComplete = function (target_mc) {
_level50._visible = false;
}


I don't see anything wrong in it, and have another pair of eyes look it over. That person suggested that I change _level50._visible to preloader.swf._visible ... only that doesn't work either. Does anyone have any ideas?
This topic is closed to new replies. Start a new post to keep the conversation going.
kglad
kgladCorrect answer
Community Expert
May 6, 2006
case counts. use myMCL.addListener otherwise your listener methods won't execute.

3 replies

kglad
Community Expert
Community Expert
May 6, 2006
you're welcome.
Translate
Participating Frequently
May 6, 2006
You are absolutely wonderful!! thank you.

I even had someone else look it over, and they didn't see that.

Again.. thanks!
Translate
kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
May 6, 2006
case counts. use myMCL.addListener otherwise your listener methods won't execute.
Translate