Flash CS3 Documentation |
|||
| Programming ActionScript 3.0 > Working with dates and times > Basics of dates and times | |||
Dates and times are a common type of information used in ActionScript programs. For instance, you might need to know the current day of the week or to measure how much time a user spends on a particular screen, among many other possibilities. In ActionScript, you can use the Date class to represent a single moment in time, including date and time information. Within a Date instance are values for the individual date and time units, including year, month, date, day of the week, hour, minutes, seconds, milliseconds, and time zone. For more advanced uses, ActionScript also includes the Timer class, which you can use to perform actions after a certain delay or at repeated intervals.
This chapter describes the following common tasks for working with date and time information:
The following reference list contains important terms that you will encounter in this chapter:
As you're working through the chapter, you may want to test some of the example code listings for yourself. Because the code listings in this chapter deal primarily with Date objects, testing the examples will involve viewing the values of the variables used in the examples, either by writing values into a text field instance on the Stage, or by using the trace() function to print values to the Output panel. These techniques are described in detail in Testing in-chapter example code listings.
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00000072.html