Topic: Hide objects on Loop External Variables

I have the following problem on my loop receiving external variables

There are more then 100 different buttons that do reference to more then 100 different Objects

each time that button are clicked all anothers objects disappear except the user choice
But all objects are being created by loop, so
was created a Principal variable named ref with all attributes of the object, //Here working perfectly
My real doubt is how i do to give 2 values to a variable or what the better thing to fix it...?
follows below my example:

Button:
---------------------------------------------------------
//BT_object1
on(release){
_root.mymovie.simb1 = 1;
_root.mymovie.simb2 = 0;
_root.mymovie.simb3 = 0;
}
//BT_object2
on(release){
_root.mymovie.simb1 = 0;
_root.mymovie.simb2 = 1;
_root.mymovie.simb3 = 0;
}
//BT_object3
on(release){
_root.mymovie.simb1 = 0;
_root.mymovie.simb2 = 0;
_root.mymovie.simb3 = 1;
}
---------------------------------------------------------
Actions inside MC mymovie
//variables external
var objetos = 3;
---------------------------------------------------------
var type1 = "choco";
var takeid1 = simb1;
var pos1x = 200;
var pos1y = 150;

var type2 = "peanut"
var takeid2 = simb2;
var pos2x = 300;
var pos2y = 250;

var type3 = "candy";
var takeid3 = simb3;
var pos3x = 350;
var pos3y = 300;
---------------------------------------------------------
//begin of the loop

for (var i = 1; i<=objetos; i++) {
	ref = _root.mymovie.attachMovie(eval("type"+i), "obj"+i, _root.mymovie.getNextHighestDepth());
	ref._x = eval("_pos"+i+"x");
	ref._y = eval("_pos"+i+"y");

ref._visible = eval("takeid"+i);//Here is my problem
//Because the result will be ref._visible = simb1;
//but i need of ref._visible = 0;
//and each click of a different button recognize the Value simb1 as 1 or 0
// then when i to press my button
//BT_object1
/*
on(release){
_root.mymovie.simb1 = 1;
_root.mymovie.simb2 = 0;
_root.mymovie.simb3 = 0;
*/
//it will hide all objects except the "choco" simb1

	};
}

I hope that someone can to help me and I'm sorry about the bad English im learning it too
thanks all smile

Re: Hide objects on Loop External Variables

Hi dingolandia,

It is hard to get exactly what you are trying to do, I understand you have about 100 objects and you are giving them unique names on the fly. but how is your loop breaking and what are you trying to accomplish with your loop?

...helmut

"...porque Jehová tu Dios estará contigo en dondequiera que vayas." Joshua 1:9