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

Create successful ePaper yourself

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

setUTCDate (Date.setUTCDate method)<br />

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

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

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

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

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

Parameters<br />

date:Number - A 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 with today's date, uses<br />

Date.setUTCDate() to change the date value to 10, <strong>and</strong> changes it again to 25:<br />

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

my_date.setUTCDate(10);<br />

trace(my_date.getUTCDate()); // output: 10<br />

my_date.setUTCDate(25);<br />

trace(my_date.getUTCDate()); // output: 25<br />

See also<br />

getUTCDay (Date.getUTCDay method), getDay (Date.getDay method)<br />

setUTCFullYear (Date.setUTCFullYear method)<br />

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

Sets the year for the specified Date object (my_date) in universal time <strong>and</strong> returns the new<br />

time in milliseconds.<br />

Optionally, this method can also set the month <strong>and</strong> date represented by the specified Date<br />

object. 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 />

Parameters<br />

year:Number - An integer that represents the year specified as a full four-digit year, such as<br />

2000.<br />

326 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!