Publishers of technology books, eBooks, and videos for creative people

Home > Articles

Keeping Track of Time with Flash MX

  • Print
  • + Share This
The twin concepts of date and time--and the tools used to measure them--are human inventions. They are used to rationalize, sequence, and measure the events of our lives. Although often bundled together, these elements function very differently. In this article, John Dalziel walks you through these differences as he helps you build an interactive map of the world's time zones in Flash MX.
From the author of

What time is it?

This question has been mulled over by the world's greatest minds since the dawn of civilization. The answer is complex and raises more questions than it answers. The current time is the crucial variable in any dynamic web site. This project is going to explore the ActionScript Date object, and along the way, you'll discover a bit more about the history and politics of timekeeping.

Figure 1Figure 1

It Works Like This

In Flash, the ActionScript Date object is a convenient way to group date and time variables. After an ActionScript date has been defined, it can be expressed in either UTC or local time.

In this project, you are going to build a Flash application that is driven by the properties and methods of the Date object. By the end of this tutorial, you will have done the following:

Centered the world map on the viewer's location

  • Compared Coordinated Universal Time with the local time in other zones

  • Added and subtracted dates and times

  • Built a real-time analogue clock for each zone

Figure 2Figure 2

  • + Share This
  • 🔖 Save To Your Account