Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 309
Daniel Avatar asked Jan 20 '23 00:01

Daniel


1 Answers

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)

like image 111
Tyler Egeto Avatar answered Jan 25 '23 02:01

Tyler Egeto