i need to convert my code which it is in as2 to as3 im working on making on screen keyboard but i couldnt,,,, can you help?
_root.enterField = "";
//Numbers Array
numbers = new Array("0","1", "2", "3", "4", "5", "6", "7", "8", "9");
numberText = new Array("zero","one", "two", "three", "four", "five", "six", "seven", "eight", "nine");
//Set the Numbers in the text boxes, and create the onPress function for the numbers state.
for(ip=0; ip<10; ip++){
_root[numberText[ip]].keyLabel = numbers[ip];
_root[numberText[ip]].onPress = function() {
this.gotoAndPlay("down");
_root.enterField = _root.enterField+this.keyLabel;
}
}
//Backspace button delete the last text
backspace.onPress = function(){
_root.enterField = _root.enterField.slice(0, enterField.length-1);
this.gotoAndPlay(2);
}
//Space Bar
space.onPress = function(){
_root.enterField = _root.enterField+" ";
this.gotoAndPlay(2);
}
//Caps Lock
capslock.onPress = function(){
this.gotoAndPlay("off");
}
//Clear Button
clear.onPress = function(){
_root.enterField = "";
this.gotoAndPlay(2);
}
stop();