# Correct syntax

**URL:** <https://forum.kirupa.com/t/correct-syntax/217663>\
**Category:** Uncategorized\
**Created:** [February 28, 2007, 8:43pm UTC](https://forum.kirupa.com/t/correct-syntax/217663 "2007-02-28T20:43:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimjiminyjimjim](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@jimjiminyjimjim](https://forum.kirupa.com/u/jimjiminyjimjim)\
**Post date:** [February 28, 2007, 8:43pm UTC](https://forum.kirupa.com/t/correct-syntax/217663/1 "2007-02-28T20:43:33Z")

</div>

I have a loop that attaches an item from the libary

```auto

for(x=0;x<myLv.n;x++) {
		
new_mc = _root.priceList.attachMovie("price_slot", "mc_"+x, x);

}

```

I then want to refer to each of the movieclips path with something like this:

```auto

_root.priceList.["mc_"+x].listContainer.attachMovie

```

What is the correct syntax for what I am trying to write. I know the code works because if I write

```auto

_root.priceList.mc_1.listContainer.attachMovie

```

It does what I want. Any help much appreciated, thank you.
