Can someone look at this for me and talk me through where I'm going wrong? The input text box allows a student to spell a word. If correct it's removed from the array. At the end the array is called to show which words were wrong. I'd like to just import a list but small steps first. Thank you.


So it looks like this
stop();
var a:Array = [' a', ' b', ' c', ' -'] // ' a' to space out wrong words at the end
var final_words:array = new Array ();
var new_score:Number = 0;
answerBox.text = " ";// input box for user
stage.focus = answerBox;

stage.addEventListener(KeyboardEvent.KEY_DOWN,keyP ressed);
function keyPressed(evt:KeyboardEvent):void {
if (evt.keyCode == Keyboard.ENTER) {
if(answerBox.text == "a"){
gotoAndStop(3);
//trace("3")
new_score ++ ;
a.removeItem(' a');// in final array should not have " a" in it
final_words = new Array(a);// new array to be displayed at the end in txtbox - words removed each time kid gets one right

trace(new_score)
} else {
if (answerBox.text !="") {
//trace("4");
new_score = new_score;
gotoAndStop(4); // this frame has wrong_words_box.txt = final_words
}
}
}
}

--------------------------------------------------------------------------------