Chapter 28. A Scheduler Program

In the preceding six chapters, we created a variety of applications that drew on skills learned in recipes from earlier chapters. In this chapter, we develop a scheduler application, which, not surprisingly, relies on the Date class covered in Chapter 10 and various techniques you’ve learned in other chapters. The completed version of the application is available at http://www.person13.com/ascb.

Designing the Application Structure

The first thing to do when developing this scheduler program is to determine which pieces should make up the entire application, and how they fit together. We’ll design the first version of the application to write data to a local shared object. Later, we’ll revise the application so that it can be written to disk and retrieved from any computer. Initially, the entire application can be built using a single Flash document (though later we will add a server-side script as well). This application depends on the Calendar component available as part of the Flash UI Components Set 2. You must drag an instance from the Components panel to the Stage to add it to the Library.

In the course of the chapter, we will create the following custom components:

Time selector component (TimeSelector)

This component is composed of a menu of 24 button movie clips (TimeSelectorItem components). Each item in the menu represents an hour of the day.

Time selector item component (TimeSelectorItem)

These components make up the time selector menu. When ...

Get Actionscript Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.