Events declared in a class
I sometimes see events declared near the top of the class (i.e. below the impo开发者_运维百科rts but above the constructor):
/**
* Description here
*
**/
[Event(name="complete", type="flash.events.Event")]
What exactly is this? Is this an "import" of a certain type of event?
It's an as3 metadata tag. See more there: http://livedocs.adobe.com/flex/3/html/help.html?content=metadata_3.html
This particular tag is used to define valid event attributes in a MXML tag representing that class. The IDE will also use those to let you autocomplete.
精彩评论