zoukankan      html  css  js  c++  java
  • 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



  • 相关阅读:
    rpc
    route
    ROLLBACK
    rmdir -删除空目录
    rm
    rlogin
    REVOKE
    resolver
    RESET
    repquota
  • 原文地址:https://www.cnblogs.com/crkay/p/2256971.html
Copyright © 2011-2022 走看看