
15.10.2003, 16:46
|
|
Регистрация: May 2003
Сообщений: 144
|
волшебник
работает и на все буквы:
eng=new Array(97, 98.. ..74, 90);
geo=new Array(4304, 4305.. ..46, 96);
tf.onChanged = function(){checkStr();}
function checkStr() {
letter_code = Key.getAscii();
checkSimb=String.fromCharCode(letter_code);
i=0;
for (i=0; i<=geo.length; i++) {
if (eng[i] == letter_code) {
replaceSimb = String.fromCharCode(geo[i]);
}}
if(txt=='' || txt==undefined)return;
while((i=txt.indexOf(checkSimb))>-1)txt=txt.substring(0, i)+replaceSimb+txt.substring(i+1, txt.length);
}
|