Search code examples
flashapache-flexcomponentsswcdispatchevent

FLEX: flash-component not receiving it's own custom event


I made a movieclip in flash that dispatches a custom event: MyEvent.THE_TYPE = "the_type"

in flex I have: <local:my_flash_mc the_type="do_something()"

however, this is not working.

in flash, my event bubbles is set to true. everything works fine in flash.

in flex I am NOT using:

<fx:Metadata>
  [Event(name="the_type", type="...")]  
</fx:Metadata> 

... because I think that this only pertains to custom flex events; plus the .swc is already compiled, so no reason to identify the event class in the type param here.

I tried creating a 'name' property in my event class, but that didn't do it.

any thoughts?

thanks


Solution

  • please see: forums.adobe.com/message/3668890#3668890 for a detailed explanation of how I solved my problem ...

    the main issue, for me, was the [Event ...] metadata tag.

    once I put it inside my flash mc, Flex began to recognize the component's need for the custom event ( code hinting listed the event ).