actionscript中this和super的指向问题

 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



posted @ 2011-11-21 11:57  硕气书生  Views(613)  Comments(0Edit  收藏  举报