Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

addEventListener not working!!!

Guest
Oct 29, 2007 Oct 29, 2007
Adding event listeners to a loader, and it won't call the function!! here is the code:

it doesn't trace anything... anyone know why? is AS3 still buggy? we have weird problems with it!
TOPICS
ActionScript
256
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 29, 2007 Oct 29, 2007
I'm not with my Flash CS3 at the moment and I haven't done this enough to just rattle it off the top of my head. but I think there are several things going wrong..

First I don't think you can just add the listeners directly to the loader. Isn't there some kind of loader progress object that you have to attach them too?

Next check the documentation. It seems strange that some of the events would come from the Event class and others from the ProgressEvent class. I seem to recall they all come from the same place.

And in general the answer is "No." no version of actionscript has been particularily buggy. I think there are probably less than one hand's worth of bona fide bugs. Most of the time it is operator error.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 29, 2007 Oct 29, 2007
LATEST
DOH!

looked at the help, they're passing the contentLoaderInfo into a function... so I just did this:

splashScreenLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, splashComplete);
splashScreenLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, splashLoader);
splashScreenLoader.contentLoaderInfo.addEventListener(Event.INIT, splashLoader);
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines