Getmilliseconds (Date.getmilliseconds Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Example
The following example uses the constructor to create a Date object based on the current time
and uses the
getHours()
var my_date:Date = new Date();
trace(my_date.getHours());
var my_date:Date = new Date();
var hourObj:Object = getHoursAmPm(my_date.getHours());
trace(hourObj.hours);
trace(hourObj.ampm);
function getHoursAmPm(hour24:Number):Object {
var returnObj:Object = new Object();
returnObj.ampm = (hour24<12) ? "AM" : "PM";
var hour12:Number = hour24%12;
if (hour12 == 0) {
hour12 = 12;
}
returnObj.hours = hour12;
return returnObj;
}

getMilliseconds (Date.getMilliseconds method)

public getMilliseconds() : Number
Returns the milliseconds (an integer from 0 to 999) of the specified Date object, according to
local time. Local time is determined by the operating system on which Flash Player is
running.
Availability: ActionScript 1.0; Flash Player 5
Returns
- An integer.
Number
Example
The following example uses the constructor to create a Date object based on the current time
and uses the
getMilliseconds()
var my_date:Date = new Date();
trace(my_date.getMilliseconds());
484
ActionScript classes
method to display hour values from that object:
method to return the milliseconds value from that object:

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF