让TextField鼠标出现手形

var tf:TextField = new TextField();

tf.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
tf.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);


function onMouseOver(e:MouseEvent) {
        Mouse.cursor="button";       //当鼠标移到动态文本上时出现手形
}
function onMouseOut(e:MouseEvent) {
        Mouse.cursor="arrow";        //当鼠标离开动态文本时取消手形,恢复为箭头
}

你可能感兴趣的:(textfield)