Hi

In the Rifle class I want to let its parent (Weapon class) to know which bullet class to use.

I was thinking of the following:

====

class Weapon extends MovieClip {
public var bulletClassName : String
public function fire () : void {
var bullet:Bullet = new bulletClassName();
}
}


class Rifle extends Weapon {
public function Rifle () {
bulletClassName = "RifleBullet";
}

}

var rifle:Rifle = new Rifle();
rifle.fire();

===

How can I do an evaluation on "new bulletClassName()"?
Or does anyone has another solution?

greetings