Mega Code Archive

 
Categories / Flash ActionScript / Data Type
 

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);     }   } }