Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript language elements > Operators > instanceof operator | |||
object instanceof classConstructor
Tests whether 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
object : Object - An ActionScript object.
classConstructor : Function - A reference to an ActionScript constructor function, such as String or Date.
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.
Version 8
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00001831.html
Comments
thx1138 said on Mar 29, 2006 at 7:10 PM : olf said on Mar 26, 2007 at 8:18 AM :