0

I thought that describeType would list the events an object dispatches but I don't see any listed in the describe type XML. Is there a way to list the events or am I missing something?

For example, on Spark Button there is "click", "mouseDown", "mouseUp", "focusIn", etc

zero323
  • 322,348
  • 103
  • 959
  • 935
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231

1 Answers1

1

It looks like describeType does work but it doesn't show inherited events (metadata). So while the Spark Button seems to dispatch events all it's events are actually declaredin in it's super classes. Checking the ButtonBase class correctly shows some event metadata.

UPDATE: The previous code I posted here had some errors in it. I've updated the code and pasted it here.

1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
  • I believe describeType will also give you the class path of the base class, so you should be able to recursively iterate over the base classes all the way up to UIComponent and retrieve the event metadata that way. – RIAstar Jun 10 '13 at 08:40
  • Technically, you may have to go beyond UIComponent; right? The click event is an event from InteractiveObject http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/InteractiveObject.html#event:click as one example. – JeffryHouser Jun 10 '13 at 13:15
  • Yeah. I'm working on a method to work my way all the way up to Object. – 1.21 gigawatts Jun 10 '13 at 13:51