# Loop problem (FOR){}

**URL:** <https://forum.kirupa.com/t/loop-problem-for/102919>\
**Category:** Uncategorized\
**Created:** [February 28, 2004, 2:18pm UTC](https://forum.kirupa.com/t/loop-problem-for/102919 "2004-02-28T14:18:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flaxcreatures](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/flaxcreatures/32/448_2.png) [@flaxcreatures](https://forum.kirupa.com/u/flaxcreatures)\
**Post date:** [February 28, 2004, 2:18pm UTC](https://forum.kirupa.com/t/loop-problem-for/102919/1 "2004-02-28T14:18:13Z")

</div>

This is what I have…  
and the problem is that if I roll over any button the last will become Alpha = 100  
and the rest just stays the way it was :s

[AS]  
for(i=0; i\<10; i++){  
item = \_root.attachMovie(“blok”, “blok” + i, i)  
item.\_y = i\*20  
item.\_alpha = 30  
item.onRollOver = function(){  
item.useHandCursor = false  
item.\_alpha = 100  
item.textBox.color = "0x00FF00 "  
}  
item.onRollOut = function(){  
item.useHandCursor = false  
item.\_alpha = 30  
item.textBox.color = "0x00FF00 "  
}

}  
[/AS]
