PDA

View Full Version : More _visible property question


IonBattle
03-08-2005, 08:48 PM
Is there any command to make every symbol in your document _visible = false and only the MCs you specify true?

vladibo2
03-08-2005, 09:27 PM
Is there any command to make every symbol in your document _visible = false and only the MCs you specify true?


var arr:Array = ["one","two"];

for(var sub:String in _root){
if(!Contains(arr,sub)){
_root[sub]._visible = false;
}
}

function Contains(arr:Array, str:String):Boolean{
for(var i:Number=0;i<arr.length;i++){
if(arr[i]==str) return true;
}
return false;
}