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.

}<br />

var monthNames_array:Array = new Array("January", "February", "March",<br />

"April", "May", "June", "July", "August", "September", "October",<br />

"November", "December");<br />

return monthNames_array[month];<br />

getSeconds (Date.getSeconds method)<br />

public getSeconds() : Number<br />

Returns the seconds (an integer from 0 to 59) of the specified Date object, according to local<br />

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

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

Returns<br />

Number - An integer.<br />

Example<br />

The following example uses the constructor to create a Date object based on the current time<br />

<strong>and</strong> uses the getSeconds() method to return the seconds value from that object:<br />

var my_date:Date = new Date();<br />

trace(my_date.getSeconds());<br />

getTime (Date.getTime method)<br />

public getTime() : Number<br />

Returns the number of milliseconds since midnight January 1, 1970, universal time, for the<br />

specified Date object. Use this method to represent a specific instant in time when comparing<br />

two or more Date objects.<br />

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

Returns<br />

Number - An integer.<br />

Example<br />

The following example uses the constructor to create a Date object based on the current time,<br />

<strong>and</strong> uses the getTime() method to return the number of milliseconds since midnight January<br />

1, 1970:<br />

var my_date:Date = new Date();<br />

trace(my_date.getTime());<br />

492 <strong>ActionScript</strong> classes

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

Saved successfully!

Ooh no, something went wrong!