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.

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

trace(today_date.getYear()); // output: 104<br />

trace(today_date.getFullYear()); // output: 2004<br />

See also<br />

getFullYear (Date.getFullYear method)<br />

setDate (Date.setDate method)<br />

public setDate(date:Number) : Number<br />

Sets the day of the month for the specified Date object, according to local time, <strong>and</strong> returns<br />

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

Flash Player is running.<br />

Parameters<br />

date:Number - An integer from 1 to 31.<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.setDate() to change the date to May 25, 2004:<br />

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

trace(today_date.getDate()); //displays 15<br />

today_date.setDate(25);<br />

trace(today_date.getDate()); //displays 25<br />

setFullYear (Date.setFullYear method)<br />

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

Sets the year of the specified Date object, according to local time <strong>and</strong> returns the new time in<br />

milliseconds. If the month <strong>and</strong> date parameters are specified, they are set to local time. Local<br />

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

Calling this method does not modify the other fields of the specified Date object but<br />

Date.getUTCDay() <strong>and</strong> Date.getDay() can report a new value if the day of the week<br />

changes as a result of calling this method.<br />

Date 321

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

Saved successfully!

Ooh no, something went wrong!