03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Tests whether object is an instance of classConstructor or a subclass of<br />

classConstructor. The instanceof operator does not convert primitive types to wrapper<br />

objects. For example, the following code returns true:<br />

new String("Hello") instanceof String;<br />

Whereas the following code returns false:<br />

"Hello" instanceof String;<br />

Oper<strong>and</strong>s<br />

object : Object - An ActionScript object.<br />

classConstructor : Function - A reference to an ActionScript constructor function, such<br />

as String or Date.<br />

Returns<br />

Boolean - If object is an instance of or a subclass of classConstructor, instanceof<br />

returns true, otherwise it returns false. Also, _global instanceof Object returns false.<br />

See also<br />

typeof operator<br />

< less than operator<br />

expression1 < expression2<br />

Compares two expressions <strong>and</strong> determines whether expression1 is less than expression2; if<br />

so, the operator returns true. If expression1 is greater than or equal to expression2, the<br />

operator returns false. String expressions are evaluated using alphabetical order; all capital<br />

letters come before lowercase letters.<br />

Oper<strong>and</strong>s<br />

expression1 : Number - A number or string.<br />

expression2 : Number - A number or string.<br />

Returns<br />

Boolean - The Boolean result of the comparison.<br />

Example<br />

The following examples show true <strong>and</strong> false returns for both numeric <strong>and</strong> string<br />

comparisons:<br />

144 ActionScript language elements

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!