03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

setMonth (Date.setMonth method)<br />

public setMonth(month:Number, [date:Number]) : Number<br />

Sets the month for the specified Date object in local time <strong>and</strong> returns the new time in<br />

milliseconds. Local time is determined by the operating system on which Flash Player is<br />

running.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 5<br />

Parameters<br />

month:Number - An integer from 0 (January) to 11 (December).<br />

date:Number [optional] - An integer from 1 to 31. If you omit this parameter, the date field<br />

of the specified Date object will not be modified.<br />

Returns<br />

Number - An integer.<br />

Example<br />

The following example initially creates a new Date object, setting the date to May 15, 2004,<br />

<strong>and</strong> uses Date.setMonth() to change the date to June 15, 2004:<br />

var my_date:Date = new Date(2004,4,15);<br />

trace(my_date.getMonth()); //output: 4<br />

my_date.setMonth(5);<br />

trace(my_date.getMonth()); //output: 5<br />

setSeconds (Date.setSeconds method)<br />

public setSeconds(second:Number) : Number<br />

Sets the seconds for the specified Date object in local time <strong>and</strong> returns the new time in<br />

milliseconds. Local time is determined by the operating system on which Flash Player is<br />

running.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 5<br />

Parameters<br />

second:Number - An integer from 0 to 59.<br />

Returns<br />

Number - An integer.<br />

502 <strong>ActionScript</strong> classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!