Example
In the following example, the expression A does not equal the expressions B or D, so the
statement following the
Output panel.
var dayOfWeek:Number = new Date().getDay();
switch (dayOfWeek) {
case 1 :
trace("Monday");
break;
case 2 :
trace("Tuesday");
break;
case 3 :
trace("Wednesday");
break;
case 4 :
trace("Thursday");
break;
case 5 :
trace("Friday");
break;
default :
trace("Weekend");
}
See also
switch statement
delete statement
delete reference
Destroys the object reference specified by the
reference is successfully deleted;
used by scripts. You can use the
references to an object are removed, Flash Player takes care of removing the object and freeing
the memory used by that object.
Although
is an operator, it is typically used as a statement, as shown in the following
delete
example:
delete x;
keyword is run and the
default
otherwise. This operator is useful for freeing memory
false
operator to remove references to objects. After all
delete
trace()
parameter, and returns
reference
statement is sent to the
if the
true
Statements
187
Need help?
Do you have a question about the FLASHLITE2 ACTIONSCRIPT-LANGUAGE and is the answer not in the manual?