What's happening in this simple piece of AS3 code? Why does my object change from TextField to the more generic DisplayObject?
public class Menu extends MovieClip
{
private var active_button:SimpleButton;
public function Menu()
{
active_button = SimpleButton( menu_list.getChildAt( 0 )); // ignore menu_list. it's just a collection of SimpleButtons
trace( active_button.upState ); // [object TextField]
// ** What's occuring here that makes active_button.upState no longer a TextField? **
active_button.upState.textColor = 0x000000; // "1119: Access of possibly undefined property textColor through a reference with static type flash.display:DisplayObject."
This question is simliar to http://stackoverflow.com/questions/2158886/as3-global-var-of-type-simplebutton-changes-to-displayobject-for-unknown-reason. I'm posting this because its more focused and deals with a single aspect of the broader issue.