User Guide

168 ActionScript language elements
Operands
expression1 : Object - A number, string, Boolean value, variable, object, array, or
function.
expression2 : Object - A number, string, Boolean value, variable, object, array, or
function.
Returns
Boolean - The Boolean result of the comparison.
See also
!= inequality operator
instanceof operator
object instanceof classConstructor
Tes t s w het her object is an instance of classConstructor or a subclass of
classConstructor. The instanceof operator does not convert primitive types to wrapper
objects. For example, the following code returns
true:
new String("Hello") instanceof String;
Whereas the following code returns false:
"Hello" instanceof String;
Availability: ActionScript 1.0; Flash Player 6
Operands
object : Object - An ActionScript object.
classConstructor : Function - A reference to an ActionScript constructor function, such
as
String or Date.
Returns
Boolean - If object is an instance of or a subclass of classConstructor, instanceof
returns
true, otherwise it returns false. Also, _global instanceof Object returns false.
See also
typeof operator