0 Replies Latest reply on Jul 18, 2012 10:36 AM by Chipleh

    dispatchEvent to external swf from Flash Builder...

    Chipleh Level 3



      A simple question perhaps? I've scouring the web this morning for an answer to why my external swf doesn't hear my dispatchedEvent. In my external swf, I have the following code:


      this.addEventListener("FromFlashBuilder", TraceHello, true);  function TraceHello(e:Event):void {            trace("----------------------------------HELLO!!!"); } 


      Within Flash Builder, I have the following AS:


      protected function button1_clickHandler(event:MouseEvent):void {                 dispatchEvent(new Event("FromFlashBuilder", true, true)); } 


      which applied to the mxml via:


      <s:Button click="button1_clickHandler(event)"/>


      The external swf is loaded but never hears the bubbling event when the button is clicked; is there something fundamental that I missing, a difference between working with Flash Professional CS5 and Flash Builder when it comes to dispatching events?


      Thank you for any help.