Adding Static Methods to a Class : Method : Class Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Class » Method »

 

Adding Static Methods to a Class


 

/*
static publicPrivateModifier function methodName([paramList]):datatype {
  // Method code goes here.
}
*/


package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
       Car.statcF();

    }
  }
}
class Car{

   static public function statcF(){
      trace("static");
   
   }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Class
» Method