If you omit the second parameter, ActionScript attempts to parse the number value using the most appropriate base. : Number parse : Data Type Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Data Type » Number parse »

 

If you omit the second parameter, ActionScript attempts to parse the number value using the most appropriate base.


 

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

        var nOne:Number = parseInt("0101");  // returns 65
        trace(nOne);          
        var nColorValue:Number = parseInt("0xFF0000");
        trace(nColorValue);
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Data Type
» Number parse