FlashDever
October 11th, 2009, 06:55 PM
Hello
I keep getting the following error msg below I would be very happy if some knows the solution to this:
Error Msg:
1118: Implicit coercion of a value with static type Object to a possibly unrelated type flash.events:Event
Object A dispatches Event as:
dispatchEvent({type:MainMenuEvents.EVENT_MENU_SELE CTED, dataObj:"BMW"});
Object B adds the event listener:
menu.addEventListener(MainMenuEvents.EVENT_MENU_SE LECTED, this.showChanged);
Object B contains the event handler:
public function showChanged(event:Event):void{
trace(event.dataObj);
}
Thanks
I keep getting the following error msg below I would be very happy if some knows the solution to this:
Error Msg:
1118: Implicit coercion of a value with static type Object to a possibly unrelated type flash.events:Event
Object A dispatches Event as:
dispatchEvent({type:MainMenuEvents.EVENT_MENU_SELE CTED, dataObj:"BMW"});
Object B adds the event listener:
menu.addEventListener(MainMenuEvents.EVENT_MENU_SE LECTED, this.showChanged);
Object B contains the event handler:
public function showChanged(event:Event):void{
trace(event.dataObj);
}
Thanks