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 dateOfBirth_date:Date = new Date(74, 7, 12, 18, 15);<br />

trace (dateOfBirth_date);<br />

trace (dateOfBirth_date.toString());<br />

UTC (Date.UTC method)<br />

public static UTC(year:Number, month:Number, [date:Number], [hour:Number],<br />

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

Returns the number of milliseconds between midnight on January 1, 1970, universal time,<br />

<strong>and</strong> the time specified in the parameters. This is a static method that is invoked through the<br />

Date object constructor, not through a specific Date object. This method lets you create a<br />

Date object that assumes universal time, whereas the Date constructor assumes local time.<br />

Parameters<br />

year:Number - A four-digit integer that represents the year (for example, 2000).<br />

month:Number - An integer from 0 (January) to 11 (December).<br />

date:Number [optional] - An integer from 1 to 31.<br />

hour:Number [optional] - An integer from 0 (midnight) to 23 (11 p.m.).<br />

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

second:Number [optional] - An integer from 0 to 59.<br />

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

Returns<br />

Number - An integer.<br />

Example<br />

The following example creates a new maryBirthday_date Date object defined in universal<br />

time. This is the universal time variation of the example used for the new Date constructor<br />

method. The output is in local time <strong>and</strong> varies accordingly. For Pacific Daylight Time the<br />

output is seven hours earlier than UTC: Sun Aug 11 17:00:00 GMT-0700 1974.<br />

var maryBirthday_date:Date = new Date(Date.UTC(1974, 7, 12));<br />

trace(maryBirthday_date);<br />

valueOf (Date.valueOf method)<br />

public valueOf() : Number<br />

Returns the number of milliseconds since midnight January 1, 1970, universal time, for this<br />

Date.<br />

332 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!