WebManiacs Conference – Presentation Preview

Posted: May 2, 2008 in Flex, Presentations


We are less than a month away from WebManiacs 2008, the ultimate conference for Adobe ColdFusion, Flex, and AIR developers.

During this 5 day conference there will be many session topics for beginning, intermediate, and advanced developers. I will be hosting two of the many presentations, one CF/AIRManics topic and one Flex/AIRManiacs topic.

Today I would like to give you a preview, a snippet, of my Flex 3 presentation called Using Custom Events.

Using Custom Events

Exploring The Event Object

Each time an event is fired within your application, the Flex framework creates and passes a special object called an Event Object to your handler function. Every event object contains standard information about the event that occurred such as; the type of event that fired and its target.

If we take a look at the Flex Button control we can see that the component will dispatch to three standard events;

  • buttonDown,
  • change, and
  • dataChanqge

The Button control also inherits many other events from its ancestors. Events such as;

  • click, and
  • doubleClick,

and several others are inherited from its parent class InteractiveObject. While events such as;

  • dragDrop, and
  • dragEnter

and several others are inherited from its parent class UIComponent.

These events are dispatched in response to either user interaction or programmatic change. The most common of these is the click event. Let’s take a look at an example.


(Full source will be available during my presentation)

In this example you get a glimpse of the information that is contained within the MouseEvent object. The click event follows the mouseDown and then the mouseUp events. One of the standard properties of the MouseEvent object is the currentTarget property. This property simply identifies the object (the Button component in this case) that is current recipient of the dispatched event. Other useful properties are as follows:


indicates if the CTRL key was pressed at the time the event was dispatched


indicates if the SHIFT key was pressed at the time the event was dispatched


indicates if the COMMAND key (Mac only) was pressed at the time the event was dispatched


indicates if the CTRL key was pressed at the time the event was dispatched

Armed with information like this you are now ready to provide a greater degree of interactivity within your Flex application. But what if you needed to pass more information than the standard event object provides? You can create your own event object, populate it with whatever information you need, and pass it to your event handler. In the second half of this presentation I will show you how to create and use your own custom event object.

It’s not too late to register for the WebManiacs conference, on May 19th – 23rd. Visit the WebManiacs 2008 website and see what it has to offer. You can also receive a DISCOUNT for the conference by using code TR50 when you register on the site or call 202.797.7711 extension 116.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s