i have an abstract class called Ship(extends Sprite), Ship is extended by two other classes Falcon and TieFighter. Ship,Falcon, and TieFighter are all in a package called “Ships”. Falcon class is linked up to an image in the library with base class set as flash.display.Sprite. Next I have a class called Main.as.(placed outside of the “Ships” package) Code in there looks like
var falcon:Ship = new Falcon();
falcon.x = 100;
falcon.y = 100;
addChild(falcon);
obviously this doesn’t work(implicit coercion of value type Falcon to an unrelated type ships:Ship), to make this work i have to do either var falcon:* or var falcon:Falcon, how come I can’t type it as a Ship since technically it extends Ship,