1. package
    {
     import flash.display.Sprite;
  2.  public class Test extends Sprite
     {
      private var a : Boolean;
      public var b : Boolean;
      internal var c:Boolean;
  3.   private function test1() : void
      {
  4.   }
  5.   public function test2() : void
      {
  6.   }
      
      internal function test3():void
      {
       
      }
  7.   public function Test()
      {
       super();
       trace( this.hasOwnProperty( "a" ));//false
       trace( this.hasOwnProperty( "b" ));//true
       trace( this.hasOwnProperty( "c" ));//false
       trace( this.hasOwnProperty( "test1" ));//false
       trace( this.hasOwnProperty( "test2" ));//true
       trace( this.hasOwnProperty( "test3" ));//false
      }
     }
    }

hasOwnProperty只能判断public权限的属性和方法是否存在,非public的属性和方法一律都为false,如果没注意这点,很容易导致动态获取属性或方法时程序出现所谓的bug