Use int() method to convert boolean value to integer : Type cast : Data Type Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Data Type » Type cast »

 

Use int() method to convert boolean value to integer


 


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

        int(true);  // Yields 1
        int(false);  // Yields 0

    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Data Type
» Type cast