开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜