rss twitter

Converting a character to ASCII code number

As ord(character) is somehow a privilege of Flash Light and AS1 here's a small AS3 workaround to get the ASCII code number of a specific character.

Actionscript:
  1. var charCarry:String = "C";
  2. var asciiConvert:int = charCarry.charCodeAt(0);
  3. trace(asciiConvert); // 67

You can look up the complete ASCII code table here.

Leave a Reply

Powered by WordPress | Free T-Mobile Phones for Sale | Thanks to Palm Pre Blog, Video Game Music and Get Six Pack Abs