Skip navigation
Currently Being Moderated

dispatchEvent to external swf from Flash Builder...

Jul 18, 2012 10:36 AM

Hi,

 

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.

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points