package{ import flash.display.Sprite; public class Main extends Sprite{ public function Main(){ var rBunny:Rabbit = new Rabbit(); rBunny.eat(); } } } class Mammal { public function eat():void { trace("mammal"); } } class Rabbit extends Mammal { public override function eat():void { super.eat(); trace("rabbit"); } }