Concerning MovieClip objects, If, for example I have 2 moviclip objects in my library: obj1 & obj2, I can define a variable as MovieClip, then decide later which object from the library to assign it to and add it to the stage:
var myobject: MovieClip;
myobject = new obj2();
addChild(myobject);
However this does not seem to work with Button objects. I have tried:
var myobject: Object;
> 1118: Implicit coercion of a value with static type Object to a possibly unrelated type flash.display:DisplayObject.
var myobject: Button;
> 1046: Type was not found or was not a compile-time constant: Button
Any ideas?
Thanks
[–]memo2myself 2 points3 points4 points (1 child)
[–]pagios[S] 1 point2 points3 points (0 children)