Use the this keyword when referring to an instance variable with the same name as a function variable : Variable Declare : Data Type Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Data Type » Variable Declare »

 

Use the this keyword when referring to an instance variable with the same name as a function variable


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    var foo;
   
    public function Main(){


    }public function setFoo (foo:String):void {
        this.foo = foo;
}

  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Data Type
» Variable Declare