EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Instanceof Operator

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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
Tests w h e t h e r 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

Table of Contents

Related product manuals