开发者

inner class in AS

开发者 https://www.devze.com 2023-01-14 13:23 出处:网络
for example: package{ public class A { var test:String; public function A() } 开发者_如何学Python } class B{

for example:

 package{
    public class A {
       var test:String;
       public function A()
       }
开发者_如何学Python
}
 class B{

}

the code is in the same file, we call B is inner class, then how to call the constructor of class B


package
{
    public class A 
    {
       var test:String;

       public function A()
       {
          var b:B = new B();
       }
    }
}
class B
{
   public function B()
   {
       trace('class B');
   }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消