PDA

Просмотр полной версии : addListener with InputText


BlackValmont
21.04.2008, 13:16
this.createTextField("txt", this.getNextHighestDepth(),100, 30, 50,50);
txt.border = true;
txt.type = "input";
var listener:Object = new Object();
listener.onKeyDown = function() {
txt.text = "111";
};
Key.addListener(listener);

нажимается буква g

1)вместо 111 в строке выводиться g111
2)вместо 111 в строке выводиться 1g11
3)вместо 111 в строке выводиться 11g1
4)вместо 111 в строке выводиться 111g

как от этого избавиться ?

iNils
21.04.2008, 13:24
Сменить onKeyDown на onKeyUp