# A simple But unKnow error

**URL:** <https://forum.kirupa.com/t/a-simple-but-unknow-error/233608>\
**Category:** flash\
**Created:** [July 25, 2007, 1:08pm UTC](https://forum.kirupa.com/t/a-simple-but-unknow-error/233608 "2007-07-25T13:08:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dingolandia](https://avatars.discourse-cdn.com/v4/letter/d/d26b3c/32.png) [@dingolandia](https://forum.kirupa.com/u/dingolandia)\
**Post date:** [July 25, 2007, 1:08pm UTC](https://forum.kirupa.com/t/a-simple-but-unknow-error/233608/1 "2007-07-25T13:08:04Z")

</div>

## 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;// or 1 as visible  
//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 🙂
