I'm new to AS3 but I've done some stuff with flash before. I have a class that extends MovieClip and has some properties and functions that I've defined. How do I associate an image with this class so that I can add objects of its type to the stage and see that image (along with being able to associate mouse events, etc.)? Here's the class:
public class Tank extends MovieClip {
public var Id:int;
public var HP:int;
public var Dmg:int;
public function Tank(id:int, hp:int, dmg:int){
// constructor code
this.Id = id;
this.HP = hp;
this.Dmg = dmg;
}
}
Image
do you mean that you've imported a Bitmap or created some Vector graphics with the tools in Flash and converted it to a MovieClip? – Marty