The following example instantiates a Truck object, calls a method overridden by the Truck class
(
), then calls a method defined in the Vehicle class (
):
reverse()
stop()
var myTruck:Truck = new Truck(2, "White", 18);
myTruck.reverse(); // output: [Truck] make beeping sound [Vehicle] reverse
myTruck.stop(); // output: [Vehicle] stop
See also
class, implements, interface,
super
extends
155
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?