package{
import flash.display.Sprite;
publicclass Main extends Sprite{
public function Main(){
var cInstance = new C( );
cInstance.m(); // Displays: Method m( ) was called
cInstance.n(); // Displays: Method n( ) was called
cInstance.o(); // Displays: Method o( ) was called
trace(cInstance.v); // Displays: 10
}
}
}
class A {
public var v = 10;
public function m ( ) {
trace("Method m( ) was called");
}
}
class B extends A {
public function n ( ) {
trace("Method n( ) was called");
}
}
class C extends B {
public function o ( ) {
trace("Method o( ) was called");
}
}