Cursor Visiblity problem in AS3

Hi Eveery One i am havin problem with my code.

with the help of my this code i can get focus to textField but cant see cursor on textBox it only visible after click on textBOx;

i can also trace mouseEvent
by receiving “HI”;



var tex:TextField = new TextField;
tex.type = TextFieldType.INPUT;
tex.text = "mtText";
addChild(tex);
tex.autoSize = TextFieldAutoSize.CENTER;


stage.addEventListener(MouseEvent.CLICK,clk);
stage.addEventListener(Event.ACTIVATE,loop);

function clk(e:MouseEvent){
	trace("HI");
	stage.focus = tex;
}

function loop(e:Event){
	dispatchEvent(new MouseEvent(MouseEvent.CLICK))	
}


i want initially cursor visiblity on it.
thanks in advance