Flash Lite 2.x and 3.0 ActionScript Language Reference

typeof operator

typeof(expression)

The typeof operator evaluate the expression and returns a string specifying whether the expression is a String, MovieClip, Object, Function, Number, or Boolean value.

Operands

expression : Object - A string, movie clip, button, object, or function.

Returns

String - A String representation of the type of expression. The following table shows the results of the typeof operator on each type of expression.

Expression Type

Result

String

string

Movie clip

movieclip

Button

object

Text field

object

Number

number

Boolean

boolean

Object

object

Function

function

See also

instanceof operator