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.

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

trace(my_date.getHours()); // output: 8<br />

my_date.setHours(16);<br />

trace(my_date.getHours()); // output: 16<br />

setMilliseconds (Date.setMilliseconds method)<br />

public setMilliseconds(millisecond:Number) : Number<br />

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

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

is running.<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 />

Parameters<br />

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

Returns<br />

Number - An integer.<br />

Date 323

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

Saved successfully!

Ooh no, something went wrong!