shizny
03-06-2008, 05:39 PM
Here is an easy one for somebody. Why am I getting this error
Error Message: parameter 'event' has no type declaration
When I have typed the Event?
My code:
private function createAndShow():void {
//call notification ? JJM
var myMenu:Menu = Menu.createMenu(null, myMenuData, false);
myMenu.labelField="@label";
myMenu.show(10, 50);
myMenu.addEventListener(MenuEvent.ITEM_CLICK, menuHandler);
}
private function menuHandler(event:MenuEvent):void {
trace("Calling the dispatchEvent: "+event.item.@id);
//event.item.@enabled = false;
dispatchEvent( new Event( event.item.@id ) );
}
Error Message: parameter 'event' has no type declaration
When I have typed the Event?
My code:
private function createAndShow():void {
//call notification ? JJM
var myMenu:Menu = Menu.createMenu(null, myMenuData, false);
myMenu.labelField="@label";
myMenu.show(10, 50);
myMenu.addEventListener(MenuEvent.ITEM_CLICK, menuHandler);
}
private function menuHandler(event:MenuEvent):void {
trace("Calling the dispatchEvent: "+event.item.@id);
//event.item.@enabled = false;
dispatchEvent( new Event( event.item.@id ) );
}