DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Help On "if" Actionscript

09.06.2007
| 1837 views |
  • submit to reddit
        hei,,  i dont know if you have the time to answer me this questions,  but i'm a little bit deseperated....

i have this script:


var arreglo3:String =_root.btn3admintitle;

var arreglo4:String =_root.btn4minsidetitle;

var arreglo5:String =_root.btn5systemtitle;


if(arreglo3 == "falso"){
	_root.btn3.titu.text = arreglo3;
}
	else{
	_root.mainMenu.peliMovie.attachMovie("btn3admin", "btn3adminvideo", this.getNextHighestDepth(), {_x:5, _y:18});
}



if(arreglo4 == "falso"){
	this.btn4.titu.text = arreglo4;
}
	else{
	this.mainMenu.peliMovie.attachMovie("btn4minside", "btn4minsidevideo", this.getNextHighestDepth(), {_x:5, _y:54});
}


if(arreglo5 == "falso"){
	this.btn5.titu.text = arreglo5;
}
	else{
	this.mainMenu.peliMovie.attachMovie("btn5system", "btn5systemvideo", this.getNextHighestDepth(), {_x:5, _y:92});
}



what i want to do is to evaluate several times different variables, wheter if they are = to "falso" or to ather string, 

The problem is that when the script runs it only read the last script...  the last "if"...  how can i make it to read all the 3 "if's"...??  or more?....

thanks

alejandro