# Get ASCII Code from String

**URL:** <https://forum.kirupa.com/t/get-ascii-code-from-string/204305>\
**Category:** flash\
**Created:** [October 18, 2006, 5:48pm UTC](https://forum.kirupa.com/t/get-ascii-code-from-string/204305 "2006-10-18T17:48:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickcherryjiggz](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/nickcherryjiggz/32/2107_2.png) [@nickcherryjiggz](https://forum.kirupa.com/u/nickcherryjiggz)\
**Post date:** [October 18, 2006, 5:48pm UTC](https://forum.kirupa.com/t/get-ascii-code-from-string/204305/1 "2006-10-18T17:48:21Z")

</div>

Is there any function that I could use to get the ASCII value of an already stored character (string)? I’m not looking to get this value via keypress, but to use a stored string variable. Or do I just need to make my own function with a switch statment for all the characters (case a: charasciicode = “blah”, case b:, etc. etc. etc.)? Thanks.
