# Loop Problem!

**URL:** <https://forum.kirupa.com/t/loop-problem/304904>\
**Category:** flash\
**Created:** [February 16, 2010, 9:57am UTC](https://forum.kirupa.com/t/loop-problem/304904 "2010-02-16T09:57:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![J\_Mo](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@J\_Mo](https://forum.kirupa.com/u/J_Mo)\
**Post date:** [February 16, 2010, 9:57am UTC](https://forum.kirupa.com/t/loop-problem/304904/1 "2010-02-16T09:57:47Z")

</div>

Hi,

I am trying to my head around Loops and I have 3 MCs which I want positioned one above the other according the mcs before it’s height.

```auto
var clipsArray:Array = new Array("mc1", "mc2", "mc3");
trace(clipsArray);

var clipsMargin:Number = 1;

for(var i:uint = 0; i<=2; i++)
{
    if(i == 0)
    {
        clipsArray*.y = 0;
   } else
    {
        clipsArray*.y = clipsArray[i-1].y + clipsArray[i-1].height + clipsMargin
    }
}

```

Which is returning this error:

> ReferenceError: Error #1056: Cannot create property y on String.  
> at test1\_fla::sqaure\_1/frame1()

Can anyone explain what is wrong here??  
Phil
