1 Reply Latest reply on Oct 22, 2010 9:58 PM by rob_roberts

    Dispatch custom event from a loaded swf

    rob_roberts

      I am using Flash Builder 4 using the 4.1 SDK and exporting the project as an Air app. I am having trouble dispatching a custom event from a loaded swf using mx:SWFLoader. Both the loaded swf and the air app are compiled using the CustomEvent, which includes the "override public function clone():Event".

       

      When dispatchEvent(new CustomEvent(CustomEvent.APP_BUTTON_CLICK, true, false, 'http://www.test.com')) is triggered in the loaded swf, the following error occurs: TypeError: Error #1034: Type Coercion failed: cannot convert events::CustomEvent@1620f641 to events.CustomEvent

       

      Any ideas why this would happen?