如何提取AS3中嵌入图像的宽度和高度,而不是明确指出尺寸? 这里就是我想要做的事:如何提取AS3中嵌入图像的宽度和高度?
[Embed(source="../../lib/spaceship.png")]
private var ShipImage:Class;
private var ship_image:BitmapData;
public function Ship(x:int, y:int, width:Number, height:Number)
{
super(x, y, 36, 64);
ship_image = new ShipImage().bitmapData;
speed = new Point(0, 0);
}
由于超级应该构造我怎么了解事前尺寸范围内的一切之前,叫什么名字?我使用FlashDevelop作为我的IDE。