Flash Player 5.
typeof(expression) : String
expression A string, movie clip, button, object, or function.
Operator; a unary operator placed before a single parameter. The typeof operator causes the Flash interpreter to evaluate expression; the result is a string specifying whether the expression is a string, movie clip, object, function, number, or Boolean value. The following table shows the results of the typeof operator on each type of expression:
| Parameter | Output |
|---|---|
|
String |
string |
|
Movie clip |
movieclip |
|
Button |
object |
|
Text field |
object |
|
Number |
number |
|
Boolean |
boolean |
|
Object |
object |
|
Function |
function |
|
null |
null |
|
undefined |
undefined |
In the following example, all instances in a SWF file and their types are traced and displayed in the Output panel.
for (i in _root) {
trace("_root."+i+" ("+typeof (_root[i])+")");
}
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/mx2004/main_7_2/00001865.html
Comments
harleybl said on Nov 2, 2004 at 11:39 AM : headwinds said on Dec 12, 2004 at 9:49 AM : No screen name said on Jul 1, 2005 at 12:27 PM :