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.

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

Parameters<br />

millisecond:Number - An integer from 0 to 999.<br />

Returns<br />

Number - An integer.<br />

Example<br />

The following example initially creates a new Date object, setting the date to 8:30 a.m. on<br />

May 15, 2004 with the milliseconds value set to 250, <strong>and</strong> then uses<br />

Date.setMilliseconds() to change the milliseconds value to 575:<br />

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

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

my_date.setMilliseconds(575);<br />

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

setMinutes (Date.setMinutes method)<br />

public setMinutes(minute:Number) : Number<br />

Sets the minutes for a specified Date object according to local time <strong>and</strong> returns the new time<br />

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

running.<br />

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

Parameters<br />

minute:Number - An integer from 0 to 59.<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> then uses Date.setMinutes() 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.getMinutes()); // output: 0<br />

my_date.setMinutes(30);<br />

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

Date 501

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

Saved successfully!

Ooh no, something went wrong!