首页 > 应用开发 > IT综合 > Flex元数据标签之[Event]
转:http://blog.csdn.net/mnorst/article/details/6735751
Flex中引入了元数据标签的概念,这些标签并没有被编译到SWF文件中,而只是告诉编译器如何生成SWF 文件。
[Event]
使用[Event]标签定义MXML中的事件属性及组件生成的事件对象的类型。[Event]标签插入到ActionScript文件的类定义前,或者MXML文件的<mx:Metadata>块内。
Use the [Event] metadata tag to define the MXML property for an event and the data type of the event object that a component emits. You insert the [Event] metadata tag before the class definition in an ActionScript file, or in the <mx:Metadata> block in an MXML file.
用法如下:
|
属性 |
类型 |
描述 |
|
eventName |
String |
指定事件名称,包括包名。 |
|
eventType |
String |
指定定义事件对象的数据类型的类。类名可以是事件基类,Events或者Events的子类。必须包含包名。 |
用法--下面的例子指定了组件可广播的事件为myClickEvent:
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29032948/viewspace-1783495/ ,如需转载,请注明出处,否则将追究法律责任。