This session’s on Event management in Actionscipt 3 by Mr. Anantharaman (Director of Engineering, Platform Technologies – Flex,AIR,Coldfusion).
events and data management are central to a typical Flex application.
What is an Event?
- signify something happening within the Flex application that can be acted upon by the application. The application acts upon an Event through a Event Listener. Event listeners are the functions or methods that respond to specific events.
Some system events: creationComplete, initialize.
Some user events: click, change, mouseDown.
How to use an event?
-components generate and dispatch events and can consume (listen to) other events.
- register an event handler with the object.
- when an event occurs, the target object dispatches the event to all registered listeners by invoking the event listener that was registered.
- event listeners can be registered either through mxml code or through actionscript.
Object heirarchy – from the events perspective
-all visual objects, including Flex controls and containers are sub classes of DisplayObject class – they are in a tree of visual objects that make up your application
EventDispatcher class
- every component in display list can participate in the Event model.
- every object in the display list can trace its class inheritance to DisplayObject class.
-it’s not just a “dispatcher”, it implements the complete event model
Commenlt used methods to create a custom events:
-addEventListener()
-removeEventListener()
-dispatchEvent()
noted down some points from the presentation.
i need to ask someone if the ppts are being hosted anywhere. if so i’ll stop posting the points from the presentation.
10.35: break. part 2 of this session will start in 20 mins.
11.00: the next part of session 2 has started.
update: was told they would arrange for the hosting of the ppts.
One Comment
Interesting to know.