Flash Builder 4 and Flex 4 Bible- P6: When Macromedia first released Flash MX in 2002, the product was branded as the new way to build Rich Internet Applications (known by the acronym RIA). The term was invented at Macromedia to describe a new class of applications that would offer the benefits of being connected to the Internet, including access to various types of Web-based services, but would solve many of the nagging issues that had been inherent in browser-based applications since the mid-1990s | Chapter 7 Working with Events As shown in Figure the Variables view displays the event object s type and all its current property values. FIGURE The event object s type displayed in the Variables view Reading the documentation Documentation for every event in the Flex SDK includes the type of the event object that will be dispatched when the event occurs. For example the documentation for the Button class s click event shows that the event object is an instance of . To find this information follow these steps 1. Place the cursor in the object declaration in Source view. 2. Press F1 to display a list of Help subjects. 3. Click the link for the class or component you re using. 4. In the API documentation click the Events link. 5. Locate the event you re interested in and click its link. As shown in Figure you should see the specific type of the class that will be dispatched for that event. Handling specific event objects To capture information that s available only in one of the extended event classes declare the datatype of an event handler function s event argument as that class. For example this event handler function expects an instance of MouseEvent 221 Part I Flex Fundamentals private function clickHandler event MouseEvent void You clicked was the alt key pressed FIGURE Documentation for the click event InteractiveObject Propenes Methods I Events Cxarrctes click Pvmt Fvifil nlijfi I TyiM fl ash. evens . NnusrFverrt property MouseL vent type . I anquaqe Version Arttrrfrrpt . Rimtknp Versions AIR Flash Flayer 9 Dispached when a user presses and releases the main button of foe user s portng device over foe same interactmeCtoject For a did event to occur it must always follow this ser es of events n foe order of occurrence mouseOown event then mousetp. The target object must be Ktenwai for both of these events otherwise the cl ick event does not occur Any number of .