Skip to Main Content
Professional Cairngorm™
book

Professional Cairngorm™

by Jeremy Wischusen
November 2009
Intermediate to advanced content levelIntermediate to advanced
357 pages
8h 20m
English
Wrox
Content preview from Professional Cairngorm™

6.3. How Do You Create One?

You create events by extending the com.adobe.cairngorm.control.Event class. Again, depending on what example you are looking at, the location for creating events will vary. The FStop application from the article "Flex 3: Introducing Cairngorm" (cited in previous chapters) creates events in the business.events package, as shown in (Figure 6-1).

Figure 6.1. Figure 6-1

The Cairngorm store creates events in an event package, as shown in (Figure 6-2).

Figure 6.2. Figure 6-2

For the purposes of creating an example event, we'll use the business.events package.

To create an event class, start as you would in creating any new class, but stop when the New ActionScript Class dialog box appears. The naming convention for events is to prefix the word event with something descriptive about the event. (You can see numerous examples of common names in (Figure 6-2).) Once you have entered a name for your event, either enter the full package and class name, com.adobe.cairngorm.control.Event, in the Superclass field (Figure 6-3), or use the Browse button and select CairngormEvent from the Open Type dialog (Figure 6-4).

Figure 6.3. Figure 6-3
Figure 6.4. Figure 6-4 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional Java® JDK®, 6th Edition

Professional Java® JDK®, 6th Edition

W. Clay Richardson, Jeff Scanlon, Donald Avondolio, Mark W. Mitchell, Scot Schrager

Publisher Resources

ISBN: 9780470497265Purchase book