all groups > flash actionscript > january 2005 >
You're in the

flash actionscript

group:

search


search chinese_democracy
1/2/2005 8:10:10 PM
flash actionscript:
Re: search NSurveyor
1/2/2005 9:06:25 PM
FindTextIn(_root,'Search Text Goes Here');
function FindTextIn(somePlace,stext){
for(things in somePlace){
if(typeof(things)=='movieclip'){
FindTextIn(somePlace,stext);
}
if(somePlace[things].text != undefined){
if(somePlcae[things].text.indexOf(stext)!=-1){
trace('Text found in textbox: '+somePlace[things]);
}
}
}
Re: search NSurveyor
1/2/2005 11:04:28 PM
That won't work. Try this.

FindTextIn(_root,'Search Text Goes Here');
function FindTextIn(somePlace,stext){
foundSomething = false;
for(things in somePlace){
if(typeof(things)=='movieclip'){
FindTextIn(somePlace,stext);
}
if(somePlace[things].text != undefined){
if(somePlcae[things].text.indexOf(stext)!=-1){
foundSomething = true;
trace('Text found in textbox: '+somePlace[things]);
}
}
}
if(!foundSomething){
trace('Text was not found');
}
}
Re: search chinese_democracy
1/3/2005 2:02:00 PM
AddThis Social Bookmark Button