# Dynamically calling movie clip instance

**URL:** <https://forum.kirupa.com/t/dynamically-calling-movie-clip-instance/86996>\
**Category:** Uncategorized\
**Created:** [April 17, 2005, 3:43pm UTC](https://forum.kirupa.com/t/dynamically-calling-movie-clip-instance/86996 "2005-04-17T15:43:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![plu](https://avatars.discourse-cdn.com/v4/letter/p/e19b73/32.png) [@plu](https://forum.kirupa.com/u/plu)\
**Post date:** [April 17, 2005, 3:43pm UTC](https://forum.kirupa.com/t/dynamically-calling-movie-clip-instance/86996/1 "2005-04-17T15:43:07Z")

</div>

Hi there,

I’m trying to reference an instance of a movie clip without using the exact name. This is hard to explain so I’ll give you the example:

I have 6 movie clips: (mc\_movie1, mc\_movie2, mc\_movie3…etc)  
I also have 6 buttons. when I press button two for example variable ‘button\_pressed’ is set to 2.

Now, I’m trying to affect the movie clips depending on which button is pressed.

so what I want to know is how to write, for example : mc\_movie(button\_pressed).\_x =100;  
…where the (button pressed) value will mean this action will affect mc\_movie2  
if it was a string it c would be: “this is string number” + button\_pressed +" of 6"… so how can i achieve this when it’s an instance name?

very hard to explain, hope you guys understand and can help!!  
cheers:)
