1 Reply Latest reply on Sep 23, 2007 7:20 AM by kglad

    help in getter and setter

      I am a newbie in actionscript 3.0. I just created a property and the code goes like this..

      private var _lastname:String;
      private var _firstname:String;

      // create a "lastname" property
      public function get lastname():String {
      return this._lastname;
      public function set lastname(value:String):void {
      this._lastname = value;

      // create a "lastname" property
      public function get firstname():String {
      return this._firstname;
      public function set firstname(value:String):void {
      this._firstname = value;

      When i tried to build this, i got the compile time error
      "The private attribute may be used only on class property definitions".
      your help is highly appreciated!