370 Chapter 12: ActionScript Dictionary
Description
Method; returns the number of milliseconds between midnight on January 1, 1970, universal
time, and the time specified in the parameters. This is a static method that is invoked through the
Date object constructor, not through a specific Date object. This method lets you create a Date
object that assumes universal time, whereas the Date constructor assumes local time.
Example
The following example creates a new garyBirthday_date Date object defined in universal time.
This is the universal time variation of the example used for the
new Date constructor method:
garyBirthday_date = new Date(Date.UTC(1974, 7, 12));
default
Availability
Flash Player 6.
Usage
default: statements
Parameters
statements
Any statements.
Returns
Nothing.
Description
Statement; defines the default case for a switch action. The statements execute if the expression
parameter of the
switch action doesn’t equal (using strict equality) any of the expression
parameters that follow the
case keywords for a given switch action.
A
switch is not required to have a default case. A default case does not have to be last in the
list. Using a
default action outside a switch action is an error and the script doesn’t compile.
Example
In the following example, the expression A does not equal the expressions B or D so the statement
following the default keyword is run and the trace() action is sent to the Output panel.
switch ( A ) {
case B:
C;
break;
case D:
E;
break;
default:
trace ("no specific case was encountered");
}
See also
switch, case, break