View Full Version : ASCII code?
Does anybody know of a utility or program or app that finds the ASCII code of a typed or inputed word, phrase, sentence? I need it to be usable online??? Usable in Flash also? thanks!
Corey
01-28-2006, 10:21 PM
Is this what you are asking for or am I misunderstanding?
http://www.vortex.prodigynet.co.uk/misc/ascii_conv.html
I dont think it would work within flash. I need something that can work in flash and export the ASCII as a var within flash. Thanks though. Nice link.
Corey
01-28-2006, 10:50 PM
Doesn't Flash 8 run Javascript? Anyhow I'm sure this can be done in actionscript, I'll take a boo. :yes
Corey
01-28-2006, 10:58 PM
How's this?
function stringToAscii (someString){
var arry = someString.split("");
for(var i in arry){
arry[i] = arry[i].charCodeAt(0);
}
return arry;
}
function asciiToString (asciiArray){
var str = "";
var len = asciiArray.length;
for(var i=0; i<len; i++){
str += String.fromCharCode(asciiArray[i]);
}
return str;
}
var myString = "Sample";
var myAsciiArray = stringToAscii(myString);
trace(myAsciiArray);
var myAsciiToString = asciiToString(myAsciiArray);
trace(myAsciiToString);
Credit goes to someone named "Pixelwit" who posted this code to the actionscript.org forum...
:yes
Darn close to what i am looking for. I think I will use this. thanks!
Corey
01-28-2006, 11:36 PM
Eggsellent. :yes
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.