EasyManua.ls Logo

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE - Instanceof Operator

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE
780 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...
154 ActionScript language elements
Tests for the exact opposite of the equality (==) operator. If expression1 is equal to
expression2, the result is false. As with the equality (==)operator, the definition of equal
depends on the data types being compared:
Numbers, strings, and Boolean values are compared by value.
Objects, arrays, and functions are compared by reference.
Variables are compared by value or by reference depending on their type.
Availability: ActionScript 1.0; Flash Lite 1.0
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 Lite 2.0
Operands
object : Object - An ActionScript object.
classConstructor : Function - A reference to an ActionScript constructor function, such
as
String or Date.

Table of Contents

Related product manuals