# Dynamic InstanceName

**URL:** https://forum.kirupa.com/t/dynamic-instancename/293246
**Category:** flash
**Created:** [July 25, 2009, 8:43pm UTC](https://forum.kirupa.com/t/dynamic-instancename/293246 "2009-07-25T20:43:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![grover970](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@grover970](https://forum.kirupa.com/u/grover970)
#### Post date: [July 25, 2009, 8:43pm UTC](https://forum.kirupa.com/t/dynamic-instancename/293246/1 "2009-07-25T20:43:26Z")

</div>

First, I apologize if this is a repost. I’m short on time.

Basically what I want to do is target a movieClip with a dynamic instance name and move it.

I need to pass a variable “a” to target the specific instance of “new\_”.

var a = 4;

for (i:Number = 0; i \< 6; i++){  
var menuClip = movie\_mc.duplicateMovieClip(“new\_”+i, i);  
menuClip.\_x = menuClip._width \* i;  
}  
bnt.onPress = function(a){  
new_[a].\_y = 300; //— THIS DOESN"T DO IT OF COURSE  
}
