View Full Version : Dynamic Text

07-24-2006, 08:47 PM
I'm trying to run conditional checks on an input textbox as you type into the box. I have conditional checks working after entering text and clicking a button, but I'm not sure if you can do conditional checks as a user types into a field.

A little more background info: I'm trying to replicate a program for training purposes and the current function that I need this for is a search window. In the application if you type into the Last Name search field it automatically filters the list as the user types.

Any ideas? Is this even possible using flash? Any help would be greatly appreciated.

07-24-2006, 09:10 PM
Hi jcerutti81 ,

and welcome to the Forum
i think what you are looking for is a multiple Listener :

the Object a on Stage is a Textfield with the instancename >a<

Textfield.prototype.setText = function(str) {
this.text = str;
_level0.a.text = "";
myObj = new Object();
myObj.onChanged = function() {
trace("mybox's been changed");
_level0.a.onChanged = function() {

everytime a changes onChanged is getting called and you can loop true an Array to search for Keywords compared to your existing Letters

greets Aco

07-25-2006, 01:18 AM
Thanks AC, that works really well!