textChanged and valueCommit both event listener are attached with a spark textarea as follows:
addEventListener("textChanged",
function(event:Event):void {
colorize();
},false,0,true);
addEventListener("valueCommit",
function(event:Event):void {
colorize();
},false,0,true);
if I type any thing in textarea, then this colorize() function is called twice. How can I stop this one that both event should not be triggered together. Pls help
If you want to listen for typing, why do you have two listeners? If you really need two listeners, you need to queue
colorizewith asetTimeoutinstead of calling it directly: