Detailed instructions for use are in the User's Guide.
[. . . ] Flash Lite 2. x ActionScript Language Reference
Trademarks 1 Step RoboPDF, ActiveEdit, ActiveTest, Authorware, Blue Sky Software, Blue Sky, Breeze, Breezo, Captivate, Central, ColdFusion, Contribute, Database Explorer, Director, Dreamweaver, Fireworks, Flash, FlashCast, FlashHelp, Flash Lite, FlashPaper, Flash Video Endocer, Flex, Flex Builder, Fontographer, FreeHand, Generator, HomeSite, JRun, MacRecorder, Macromedia, MXML, RoboEngine, RoboHelp, RoboInfo, RoboPDF, Roundtrip, Roundtrip HTML, Shockwave, SoundEdit, Studio MX, UltraDev, and WebHelp are either registered trademarks or trademarks of Macromedia, Inc. and may be registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words, or phrases mentioned within this publication may be trademarks, service marks, or trade names of Macromedia, Inc. or other entities and may be registered in certain jurisdictions including internationally. [. . . ] Local time is determined by the operating system on which Flash Player is running. Calling this method does not modify the other fields of the specified Date object but and Date. getDay() can report a new value if the day of the week changes as a result of calling this method.
Date. getUTCDay()
Availability: ActionScript 1. 0; Flash Lite 2. 0 Parameters
year:Number - A four-digit number specifying a year. Two-digit numbers do not represent four-digit years; for example, 99 is not the year 1999, but the year 99. month:Number
[optional] - An integer from 0 (January) to 11 (December). If you omit this parameter, the month field of the specified Date object will not be modified. If you omit this parameter, the date field of the specified Date object will not be modified.
date:Number
Returns
Number
- An integer.
Example The following example initially creates a new Date object, setting the date to May 15, 2004, and uses Date. setFullYear() to change the date to May 15, 2002:
var my_date:Date = new Date(2004, 4, 15); trace(my_date. getFullYear()); //output: 2004 my_date. setFullYear(2002); trace(my_date. getFullYear()); //output: 2002
See also
getUTCDay (Date. getUTCDay method), getDay (Date. getDay method)
Date
345
setHours (Date. setHours method)
public setHours(hour:Number) : Number
Sets the hours for the specified Date object according to local time and returns the new time in milliseconds. Local time is determined by the operating system on which Flash Player is running. Availability: ActionScript 1. 0; Flash Lite 2. 0 Parameters
hour:Number
- An integer from 0 (midnight) to 23 (11 p. m. ).
Returns
Number
- An integer.
Example The following example initially creates a new Date object, setting the time and date to 8:00 a. m. on May 15, 2004, and uses Date. setHours() to change the time to 4:00 p. m. :
var my_date:Date = new Date(2004, 4, 15, 8); trace(my_date. getHours()); // output: 8 my_date. setHours(16); trace(my_date. getHours()); // output: 16
setMilliseconds (Date. setMilliseconds method)
public setMilliseconds(millisecond:Number) : Number
Sets the milliseconds for the specified Date object according to local time and returns the new time in milliseconds. Local time is determined by the operating system on which Flash Player is running. Availability: ActionScript 1. 0; Flash Lite 2. 0 Parameters
millisecond:Number
- An integer from 0 to 999.
Returns
Number
- An integer.
346
ActionScript classes
Example The following example initially creates a new Date object, setting the date to 8:30 a. m. on May 15, 2004 with the milliseconds value set to 250, and then uses Date. setMilliseconds() to change the milliseconds value to 575:
var my_date:Date = new Date(2004, 4, 15, 8, 30, 0, 250); trace(my_date. getMilliseconds()); // output: 250 my_date. setMilliseconds(575); trace(my_date. getMilliseconds()); // output: 575
setMinutes (Date. setMinutes method)
public setMinutes(minute:Number) : Number
Sets the minutes for a specified Date object according to local time and returns the new time in milliseconds. Local time is determined by the operating system on which Flash Player is running. Availability: ActionScript 1. 0; Flash Lite 2. 0 Parameters
minute:Number
- An integer from 0 to 59.
Returns
Number
- An integer.
Example The following example initially creates a new Date object, setting the time and date to 8:00 a. m. on May 15, 2004, and then uses Date. setMinutes() to change the time to 8:30 a. m. :
var my_date:Date = new Date(2004, 4, 15, 8, 0); trace(my_date. getMinutes()); // output: 0 my_date. setMinutes(30); trace(my_date. getMinutes()); // output: 30
setMonth (Date. setMonth method)
public setMonth(month:Number, [date:Number]) : Number
Sets the month for the specified Date object in local time and returns the new time in milliseconds. Local time is determined by the operating system on which Flash Player is running. Availability: ActionScript 1. 0; Flash Lite 2. 0
Date
347
Parameters
month:Number
- An integer from 0 (January) to 11 (December).
date:Number [optional] - An integer from 1 to 31. If you omit this parameter, the date field of the specified Date object will not be modified.
Returns
Number
- An integer.
Example The following example initially creates a new Date object, setting the date to May 15, 2004, and uses Date. setMonth() to change the date to June 15, 2004:
var my_date:Date = new Date(2004, 4, 15); trace(my_date. getMonth()); //output: 4 my_date. setMonth(5); trace(my_date. getMonth()); //output: 5
setSeconds (Date. setSeconds method)
public setSeconds(second:Number) : Number
Sets the seconds for the specified Date object in local time and returns the new time in milliseconds. Local time is determined by the operating system on which Flash Player is running. Availability: ActionScript 1. 0; Flash Lite 2. 0 Parameters
second:Number
- An integer from 0 to 59.
Returns
Number
- An integer.
Example The following example initially creates a new Date object, setting the time and date to 8:00:00 a. m. on May 15, 2004, and uses Date. setSeconds() to change the time to 8:00:45 a. m. :
var my_date:Date = new Date(2004, 4, 15, 8, 0, 0); trace(my_date. getSeconds()); // output: 0 my_date. setSeconds(45); trace(my_date. getSeconds()); // output: 45
348
ActionScript classes
setTime (Date. setTime method)
public setTime(millisecond:Number) : Number
Sets the date for the specified Date object in milliseconds since midnight on January 1, 1970, and returns the new time in milliseconds. Availability: ActionScript 1. 0; Flash Lite 2. 0 Parameters
millisecond:Number
- A number; an integer value where 0 is midnight on January 1,
universal time. [. . . ] substring(string:String, index:Number, count:Number)String tellTarget(target:String, statement(s)) toggleHighQuality() Deprecated since Flash Player 5. This function was deprecated in favor of String. substr(). Macromedia recommends that you use dot (. ) notation and the with statement. This function was deprecated in favor of _quality.
762
Deprecated ActionScript
Deprecated Property summary
Modifiers Property Name
Button. _highquality
Description
Deprecated since Flash Player 7. [. . . ]