# Looping using vars

**URL:** https://forum.kirupa.com/t/looping-using-vars/30571
**Category:** Uncategorized
**Created:** [September 10, 2003, 6:27pm UTC](https://forum.kirupa.com/t/looping-using-vars/30571 "2003-09-10T18:27:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![DigitalPimp](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@DigitalPimp](https://forum.kirupa.com/u/DigitalPimp)
#### Post date: [September 10, 2003, 6:27pm UTC](https://forum.kirupa.com/t/looping-using-vars/30571/1 "2003-09-10T18:27:22Z")

</div>

oh k.

I know that if you want to do a for loop and manipulate a MC on that level then you can do this

```auto

for (i=0; i<numBoxes;i++) {
	this["MCName"+i]._height = 30*i;
}

```

but how do you get to an MC not on that level?

IE

```auto

for (i=0; i<numBoxes;i++) {
	_root.b0xHolder.["MCName"+i]._height = 30*i;
}

```

This doesnt’ work, how can I make it work?
