# How to work with a string named object?

**URL:** <https://forum.kirupa.com/t/how-to-work-with-a-string-named-object/248991>\
**Category:** Uncategorized\
**Created:** [January 14, 2008, 1:25pm UTC](https://forum.kirupa.com/t/how-to-work-with-a-string-named-object/248991 "2008-01-14T13:25:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tuddy\_xx](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@tuddy\_xx](https://forum.kirupa.com/u/tuddy_xx)\
**Post date:** [January 14, 2008, 1:25pm UTC](https://forum.kirupa.com/t/how-to-work-with-a-string-named-object/248991/1 "2008-01-14T13:25:25Z")

</div>

…so, I have the following code  
for (i=1; i\<=n; i++) {  
duplicateMovieClip(\_root.object, “object”+i, i);  
//how can I choose the position of the new MovieClip?  
//“object”+i\_x = random(100) - this should work if I had a different name of variable, but in this case it doesn’t.  
//set(“object”+i\_x, random(300)); - this doesn’t work neither  
}
