I've created a CustomMenu class for an application my building.
CustomMenu extends ContextMenu and inherits EventDispatcher with functions.

My goal is to dispatch an event when the user selects an context item.
However, the dispatched event doesn't seem to trigger.

Example of my code:
[code]
class CustomMenu extends ContextMenu {
        ...
        ...
        public function CustomMenu(select : Function) {
                super(select);
                addToFavorite = new ContextMenuItem("Add(+) to My Favorites",
addToFavorites, false, true, true);
        }
        public function addToFavorites () : Void {
                trace("CustomMenu.addToFavorites()");
                dispatchEvent({type:"onAddFavorite"}); // This event does not 
reach listener
        }
}
[/code]

Would the ContextMenu class disable EventDispatcher? Is this an issue
of bubbling?
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to