Monday, May 25, 2009

Metadata tags

In Flex,there are 12 Metadata tags available:

Metadata tags provide information to the Flex compiler that describes how your components are used in a Flex application. For example, you might create a component that defines a new event. To make that event known to the Flex compiler so that you can reference it in MXML, you insert the [Event] metadata tag into your component, as the following ActionScript class definition shows:

[Event(name="enableChanged", type="flash.events.Event")]
class ModalText extends TextArea {
...
}


In this example, the [Event] metadata tag specifies the event name and the class that defines the type of the event object dispatched by the event. After you identify the event to the Flex compiler, you can reference it in MXML, as the following example shows:

No comments:

Post a Comment