-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Flex 3 with Java

Along with the built-in Flex events, you can also define your own custom events. To define custom events in MXML, the [Event]
metadata tag is used. Metadata tags provide information to the Flex compiler that describes how your components are used in a Flex application.
The following is the syntax for the [Event]
metadata tag:
<mx:Metadata> [Event(name="eventName", type="package.eventType")] </mx:Metadata>
The eventName
argument specifies the name of the event. The eventType
argument specifies the class that defines the event, including the package. Once you define a custom event using the [Event]
metadata tag, this metadata tag makes the custom event known to the compiler so that it can be referenced into the MXML component declaration. In simple words, the Flex compiler inserts the necessary code for enabling your component to register event listeners while compiling your application. Once you define event metadata, it's your responsibility to dispatch...
Change the font size
Change margin width
Change background colour