Keypress special characters in a list
I'm trying to position a movieClip depending on a keypress compared with the first letter from names in an array (eg a list of cities).
No problem except for special characters like Å, Æ Ø and others. When i trace the charactercode it doesn't match the keycode of the pressed key :(
onClipEvent(keyDown) {
pressed = Key.getCode()
name = "step" + (_root.active+1);
myArray = _parent[name].myList;
for(i=0;i<myArray.length+1;i++) {
firstChar = myArray[i].charCodeAt(0);
if(firstChar eq pressed) {
if(_root.active == 1) {
_parent[name]._y = -i*15+127;
break;
} else if(_root.active == 2) {
_parent[name]._y = -i*15+36;
break;
}
}
}
}
Note: that the array is based on the variable 'name'!
Any clues in here?
regards (god it's monday)
//pod