开发者

How to tell when a text field is empty in as3

I want to add an event listene开发者_如何学Pythonr that listens for whenever the text field goes blank (IE all text is deleted). Thank you :)


txtField.addEventListener(Event.CHANGE,onChange);

function onChange(e:Event)
{
    if(e.currentTarget.length==0)
    {
        trace("empty")
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜