03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Example<br />

The following example creates a new Date object <strong>and</strong> uses getUTCSeconds() to return the<br />

seconds value from the Date object:<br />

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

trace(today_date.getUTCSeconds());<br />

getUTCYear (Date.getUTCYear method)<br />

public getUTCYear() : Number<br />

Returns the year of this Date according to universal time (UTC). The year is the full year<br />

minus 1900. For example, the year 2000 is represented as 100.<br />

Returns<br />

Number -<br />

Example<br />

The following example creates a new Date object <strong>and</strong> uses Date.getUTCFullYear() <strong>and</strong><br />

Date.getFullYear(). The value returned by Date.getUTCFullYear() may differ from the<br />

value returned by Date.getFullYear() if today's date is December 31 or January 1,<br />

depending on the relationship between your local time zone <strong>and</strong> universal time.<br />

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

trace(today_date.getFullYear()); // display based on local timezone<br />

trace(today_date.getUTCFullYear()); // displays getYear() plus or minus 1<br />

getYear (Date.getYear method)<br />

public getYear() : Number<br />

Returns the year of the specified Date object, according to local time. Local time is<br />

determined by the operating system on which Flash Player is running. The year is the full year<br />

minus 1900. For example, the year 2000 is represented as 100.<br />

Returns<br />

Number - An integer.<br />

Example<br />

The following example creates a Date object with the month <strong>and</strong> year set to May 2004. The<br />

Date.getYear() method returns 104, <strong>and</strong> Date.getFullYear() returns 2004:<br />

320 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!