Made to Order Software Corporation Logo

Instance Of

SWF Action
Action Category: 
Objects
Action Details: 
0
Action Identifier: 
84
Action Structure: 
<n.a.>
Action Length: 
0 byte(s)
Action Stack: 
pop 1 (s), pop 1 (o)
Action Operation: 
s1 := pop();
o2 := pop();
r := o2 instance of s1;
push(r);
Action Flash Version: 
6

Pop the name of a constructor (s1 - ie. "Color") then an object (o2). Checks whether the object is part of the class defined by the named constructor. If so, then true is push on the stack, otherwise false.

Since SWF version 7, it is possible to cast an object to another using the Cast Object action. This action returns a copy of the object or Null, which in many cases can be much more practical.