Mega Code Archive

 
Categories / Flash ActionScript / Data Type
 

When the number is treated base-10, conversion stops when a non-numeric character is encountered

package{   import flash.display.Sprite;      public class Main extends Sprite{     public function Main(){         // The number is treated as a decimal, not a hexadecimal number         trace(parseInt("0x12", 10));   // Displays: 0 (not 12 or 18)     }   } }