Daniel
Daniel

Reputation: 35714

square bracket before class definition in as3

I've seen the embed tag used before the class definition, but I just saw that Keith is using these..

[Event(name="select", type="flash.events.Event")]
[Event(name="close", type="flash.events.Event")]
[Event(name="resize", type="flash.events.Event")]
public class Window extends Component{

can someone tell me what this does?

Upvotes: 4

Views: 627

Answers (1)

Tyler Egeto
Tyler Egeto

Reputation: 5495

Most importantantly, the Flex compiler uses it when interpreting MXML. But really its just metadata, ASDocs & some code completion implementations will use it to show you the available events, but thats about it.

Its in the docs here: http://livedocs.adobe.com/flex/3/html/help.html?content=createevents_3.html

Hope that helps!

(answer edited to be more accurate)

Upvotes: 9

Related Questions