1 package
2 {
3 import flash.display.Sprite;
4
5 public class A extends Sprite
6 {
7 public function A()
8 {
9 trace(this+":A");
10 trace(super+":A");
11 }
12 }
13 }
1 package
2 {
3 public class B extends A
4 {
5 public function B()
6 {
7 trace(this+":B");
8 trace(super+":B");
9 }
10 }
11 }
B是文档类,编译输出:
[object B]:A
[object B]:A
[object B]:B
[object B]:B