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

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

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

var my_date:Date = new Date(2004,4,15,8,30,0,250);<br />

trace(my_date.getUTCMilliseconds()); // output: 250<br />

my_date.setUTCMilliseconds(575);<br />

trace(my_date.getUTCMilliseconds()); // output: 575<br />

setUTCMinutes (Date.setUTCMinutes method)<br />

public setUTCMinutes(minute:Number, [second:Number], [millisecond:Number])<br />

: Number<br />

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

milliseconds.<br />

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

Parameters<br />

minute:Number - An integer from 0 to 59.<br />

second:Number [optional] - An integer from 0 to 59. If you omit this parameter, the seconds<br />

field of the specified Date object will not be modified.<br />

millisecond:Number [optional] - An integer from 0 to 999. If you omit this parameter, the<br />

milliseconds field of the specified Date object will not be modified.<br />

Returns<br />

Number - An integer.<br />

Example<br />

The following example initially creates a new Date object, setting the time <strong>and</strong> date to 8:00<br />

a.m. on May 15, 2004, <strong>and</strong> uses Date.setUTCMinutes() to change the time to 8:30 a.m.:<br />

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

trace(my_date.getUTCMinutes()); // output: 0<br />

my_date.setUTCMinutes(30);<br />

trace(my_date.getUTCMinutes()); // output: 30<br />

setUTCMonth (Date.setUTCMonth method)<br />

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

Sets the month, <strong>and</strong> optionally the day, for the specified Date object in universal time <strong>and</strong><br />

returns the new time in milliseconds. Calling this method does not modify the other fields of<br />

the specified Date object, but Date.getUTCDay() <strong>and</strong> Date.getDay() might report a new<br />

value if the day of the week changes as a result of specifying a value for the date parameter.<br />

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

Date 507

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

Saved successfully!

Ooh no, something went wrong!