How do I extract the width and height of an embedded image in AS3 instead of explicitly stating the dimensions? Here's what I'm trying to do:
[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);
}
Since super should be called before everything else within the constructor how do I learn about the dimensions beforehand? I'm using FlashDevelop as my IDE.