[RESOLVED] A way of detecting typing in a textbox in realtime w/o using onEnterFrame
Hello guys ^_^
Before posting for help, i always do an exhaustive research on the web. \
This time, i need to know how to detect when typing in a textbox in realtime, without using onEnterFrame, as onEnterFrame use a lot of CPU. You type in an input textbox, and then show that in a dynamic textbox as you type.
I already have this
Here is a little example for you to test the onChanged property
Actionscript Code:
var total = 50;// Set amount myDynamic.text = "Remaining : " + total;// Dynamic textField myInput.text = "";// Input textField myInput.maxChars = total;// Restrict to same as total var myInput.onChanged = function(textField) { myDynamic.text = "Remaining : " + (total - myInput.text.length); // Show remaining number each time changed };
Ok, i understand it well, but one thing, and thanks for everything.
I'm using variable name instead of instance name, because if i use instance name, the color of my input textbox is transferred (weirdly) to my dynamic textbox. I tried specifying my textboxes colors
Actionscript Code:
myInputTextbox.text.TextField.color="#FFFFFF";
myDynamicTextbox.text.TextField.color="#003366";
But failed. So i thought "mmm variable names?" and it worked. But the onChanged seems does not work with variable name...