# Loop Question

**URL:** https://forum.kirupa.com/t/loop-question/279058
**Category:** Uncategorized
**Created:** [January 8, 2009, 11:05pm UTC](https://forum.kirupa.com/t/loop-question/279058 "2009-01-08T23:05:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![junta](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@junta](https://forum.kirupa.com/u/junta)
#### Post date: [January 8, 2009, 11:05pm UTC](https://forum.kirupa.com/t/loop-question/279058/1 "2009-01-08T23:05:37Z")

</div>

I have a loop that I want the user to be able to rollover 19 different pictures and a caption tweens into place for each pic. I assume my code below isn’t working because the var is trying to work for “Pic” and “Cap”, is that a correct assumption? And how can I get this to work???

thanks, steve.

```auto
var boxMax:Number = 55;

for( var i:Number = 0; i < 19; i++ )

_root.Target["Pic" + i].onRollOver = function(){
TweenLite.to(_root.Target["Cap" + i], .5, { _y: boxMax });
}

```
