A constant is a variable which remains fixed for the remainder of the program. : Const : Language Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Language » Const »

 

A constant is a variable which remains fixed for the remainder of the program.


 

public class MyState {
  public static const MODE_VISUAL = 1;
  public static const MODE_AUDIO  = 2;
  public static const MODE_BOTH   = 3;

  private var mode = MyState.MODE_AUDIO;

  private function signalAlarm (  ) {
    if (mode == MODE_VISUAL) {
    else if (mode == MODE_AUDIO) {
    else if (mode == MODE_BOTH) {
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Language
» Const