Answered
Custom Events and Listeners between classes
I've got a project I've been working on for weeks that I'm
having yet another problem with. I'm trying to learn AS3 which is
why it's taking so long but that's not important for this post.
I wanted to create a custom event class so that I could make sure the event does not interfere with other "COMPLETE" events that are being passed between classes. In other words, I have a few things that need to complete prior to a function being called... one is some XML being loaded and another is a font loaded. So, I thought I would create a custom FontLoaded class that extends Event and make the type something like "FontLoadedEvent.LOADED". That way I could listen for the XML "Event.COMPLETE" and this font event also.
Please tell me if I'm going down the wrong path here but I don't seem to be getting the dispatched event for my new custom event. Also, how does one detect if it's being dispatched other than if the eventListener is fired? Any other ways to test this?
I wanted to create a custom event class so that I could make sure the event does not interfere with other "COMPLETE" events that are being passed between classes. In other words, I have a few things that need to complete prior to a function being called... one is some XML being loaded and another is a font loaded. So, I thought I would create a custom FontLoaded class that extends Event and make the type something like "FontLoadedEvent.LOADED". That way I could listen for the XML "Event.COMPLETE" and this font event also.
Please tell me if I'm going down the wrong path here but I don't seem to be getting the dispatched event for my new custom event. Also, how does one detect if it's being dispatched other than if the eventListener is fired? Any other ways to test this?