views:

52

answers:

2

hi,

Similar to the [Embed ()] tag I know from flex ¿ what's for the following code:

[Event(name="init",type="flash.events.Event")]
[Event(name="ioError",type="flash.events.IOErrorEvent")]
[Event(name="securityError",type="flash.events.SecurityErrorEvent")]

I've found this in several libraries I used, the one show here is from Flartoolkit, the code is defined inside the package, after the imports.

By the way, is this code executed when I compile in flash IDE?

Thanks, .am

+3  A: 

That's actionscript's metadata tags. These specific ones declare that the class below them throws these kind of events of these types.

http://livedocs.adobe.com/flex/3/html/metadata_3.html#159710

This metadata gets bound to the class at runtime and is available for access

artemb
Thanks artemb, I suppose that flash compiler won't read those right?
dome
I guess it will. It will also remove some of them is you specify a certain parameter
artemb
+2  A: 

[Event] metadata is for the Flex framework and are not used by the Flash IDE, but you can use of the [Embed] metadata under Flash CS4

Patrick
thanks for the info, here's the source:http://www.adobe.com/devnet/flash/articles/embed_metadata.html:)
dome