Listener/set focus issue

Hi everyone I’m having trouble setting the focus on the next text box on the form after a message is displayed. Here is what I have??


import mx.controls.Alert;
class Product {
	
	var id:Number;
	var ans:Number;
	
	/*function Product (id:Number) {
		getID(id);
		
}*/
	
	public function getId () :Number
{      var userid=_root.id;
		ans=123;
      trace("your input is:"+ userid.toString());
	  mx.accessibility.AlertAccImpl.enableAccessibility();
			_global.styles.Alert.setStyle("color", 0x4B8DEF);
			_global.styles.Alert.setStyle("themeColor", "haloBlue");
			Alert.show("Thanks for you input!");
			userid.backgroundColor = 0xFFCC33;
			userid.textColor = 0x696AC9;
			
			var myGo = new Object;
			Key.addListener(myGo)
			myGo.onKeyUp = function(){
			if (userid==ans) {
        			Selection.setFocus(_root.Name_txt);
        		Alert.show ("Thanks for you input!");
        			trace("input is valid");
    } else {
     Alert.show ("Please give proper input!");
        trace("input is not valid");
    }
}
			
			
		return userid;
}
  

Any help is needed!! Thanks