# String to object

**URL:** <https://forum.kirupa.com/t/string-to-object/137310>\
**Category:** Uncategorized\
**Created:** [February 13, 2005, 1:21pm UTC](https://forum.kirupa.com/t/string-to-object/137310 "2005-02-13T13:21:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Khaan](https://avatars.discourse-cdn.com/v4/letter/k/b5ac83/32.png) [@Khaan](https://forum.kirupa.com/u/Khaan)\
**Post date:** [February 13, 2005, 1:21pm UTC](https://forum.kirupa.com/t/string-to-object/137310/1 "2005-02-13T13:21:08Z")

</div>

hi everyone,  
i guess there have already been dozens of people asking this question, and i am sorry to ask again, but i did not find alone:

i would like to create lots of copies of lots of different clips (the original clips are called _\_root.model\_a_, _\_root.model\_b_, _\_root.model\_c_ … …) and then asign them a position depending on variables. i am using inside a loop:

```
    cnt++;
    duplicateMovieClip("_root.model_"+utype, "copy"+cnt, cnt);
    [color=Red]"copy"+cnt[/color]._x [color=DarkOrchid]=[/color] ux;
    [color=Red]"copy"+cnt[/color]._y [color=DarkOrchid]=[/color] uy;

```

then an error message tells me that the thing on the left side of the assignement [color=DarkOrchid][color=Black]"[/color]=[/color]" is not a varriable / property.  
i would like it to be a property, but to do so i guess i need to transform the thing in red (a string) to the reference to the object that has the same name.

in [this tutorial](http://www.kirupa.com/developer/mx/fire.htm) the problem is solved by putting the 2 critical line inside the clip that will be duplicated and by puting:

```
    [color=Red]this[/color]._x = ux;
     [color=Red]this[/color]._y = uy;

```

but i do not have only 1 clip that will be duplicated and i don’t want to put some code in each (if that is possible).  
in fact i would like to make an externall call to the object that is called [color=Red]“copy”+cnt[color=Black] instead of an internall call using [/color]this[color=Black].[/color][/color]

please tell me what i should do
