# Why won't this work?

**URL:** https://forum.kirupa.com/t/why-wont-this-work/193077
**Category:** Uncategorized
**Created:** [July 4, 2006, 6:56am UTC](https://forum.kirupa.com/t/why-wont-this-work/193077 "2006-07-04T06:56:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Geminian1](https://avatars.discourse-cdn.com/v4/letter/g/90db22/32.png) [@Geminian1](https://forum.kirupa.com/u/Geminian1)
#### Post date: [July 4, 2006, 6:56am UTC](https://forum.kirupa.com/t/why-wont-this-work/193077/1 "2006-07-04T06:56:08Z")

</div>

Hi Guys,  
I am trying my best to understand arrays and it is not easy! As part of the learning process, I am trying to associate each of my three \_mcs, red1, red2 and red3 with a position to tween to when clicked with this code:

```auto

import mx.transitions.Tween;
import mx.transitions.easing.*;
 
var myclips:Array = [red1,red2,red3];
var mypos:Array = [150,250,350];
 
for(i=0;i<myclips.length;i++){
  myclips*.onRelease = function(){
  new Tween(this,"_x",Back.easeOut,this._x,mypos*,3,true);
  }
}

```

myclips\* works but mypos\* does not. mypos\* does not reference each position but mypos[1], for eg, will, but then passes only position 150 for all the clips. Isn’t “i” supposed to automatically associate element 1 of one array to element 1 of the other and so on?  
Much thanks for any help.
