OK, so, try doing this:
- create a Sprite, create a SimpleButton.
- add a Sprite as a SimpleButton state, say, upState.
Now, try this:
trace(b.upState.parent); // [object SimpleButton]
trace(b is DisplayObjectContainer, // false
b.upState.parent is DisplayObjectContainer); // false
trace(describeType(b.upState).accessor.(
valueOf().@name == "parent").@type); // flash.display::DisplayObjectContainer
How do they do it?