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.

See also<br />

getMonth (Date.getMonth method), getFullYear (Date.getFullYear method)<br />

getDay (Date.getDay method)<br />

public getDay() : Number<br />

Returns the day of the week (0 for Sunday, 1 for Monday, <strong>and</strong> so on) of the specified Date<br />

object according to local time. Local time is determined by the operating system on which<br />

Flash Player is running.<br />

Returns<br />

Number - An integer representing the day of the week.<br />

Example<br />

The following example creates a new Date object <strong>and</strong> uses getDay() to determine the current<br />

day of the week:<br />

var dayOfWeek_array:Array = new Array("Sunday", "Monday", "Tuesday",<br />

"Wednesday", "Thursday", "Friday", "Saturday");<br />

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

var day_str:String = dayOfWeek_array[today_date.getDay()];<br />

trace("Today is "+day_str);<br />

getFullYear (Date.getFullYear method)<br />

public getFullYear() : Number<br />

Returns the full year (a four-digit number, such as 2000) of the specified Date object,<br />

according to local time. Local time is determined by the operating system on which Flash<br />

Player is running.<br />

Returns<br />

Number - An integer representing the year.<br />

Example<br />

The following example uses the constructor to create a Date object. The trace statement<br />

shows the value returned by the getFullYear() method.<br />

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

trace(my_date.getYear()); // displays 104<br />

trace(my_date.getFullYear()); // displays current year<br />

310 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!