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