
30.08.2004, 06:54
|
|
Регистрация: Sep 2001
Адрес: Moi address ne dom i ne ulica...
Сообщений: 634
|
Toje samoe tolko s testom dlya linivih =)))
 Код:
createTextField("t",1,0,0,120,20);
createTextField("r",2,120,0,120,20);
t.type="input",t.border=r.border=true;
words=["stop","time"];
tLstn={}
t.addListener(tLstn);
chkTxt=function(){
for(var i=0,l=words.length,k;i<l;i++){
if(t.text.indexOf(words[i])!=-1){
k++;
}
}
if(k==2){
r.text="autorization successfull";
t.removeListener(this);
}
}
tLstn.onChanged=function(){
chkTxt();
}
/// Test for lazy people:
var type="stop this time now",l=type.length,i=0;
onEnterFrame=function(){
if(i!=l){
t.text+=type.charAt(i);
}else{delete this.onEnterFrame;}
i++,chkTxt();
}
Последний раз редактировалось YuriiZelenev; 30.08.2004 в 06:58.
|