# Variable Names with Dynamic MC's

**URL:** <https://forum.kirupa.com/t/variable-names-with-dynamic-mcs/47978>\
**Category:** flash\
**Created:** [April 8, 2004, 7:49pm UTC](https://forum.kirupa.com/t/variable-names-with-dynamic-mcs/47978 "2004-04-08T19:49:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ital\_Stal](https://avatars.discourse-cdn.com/v4/letter/i/4bbf92/32.png) [@Ital\_Stal](https://forum.kirupa.com/u/Ital_Stal)\
**Post date:** [April 8, 2004, 7:49pm UTC](https://forum.kirupa.com/t/variable-names-with-dynamic-mcs/47978/1 "2004-04-08T19:49:14Z")

</div>

Hey Kirupans!

I’m making a game where I create a number of empty movie clips, and attach terrain objects from the library. That part is working fine, and I use code similar to below:

```auto

_root.createEmptyMovieClip("T" + _root.i, _root.i);
_root.attachMovie("MC_Floor_1", "T" + _root.i, _root.i);

```

Now though, how do I reference these objects later on? For instance, I want to set the starting x and y values of this clip I just made. I tried this:

```auto

_root."T" + _root.i._x = 100;

```

Flash didn’t like that syntax. Any suggestions on how I can dynamically create clips, and then still be able to reference one based on its “i” value?

Thanks for the help!

The Ital Stal :mario:
