# Setting property of duplicated component?

**URL:** <https://forum.kirupa.com/t/setting-property-of-duplicated-component/121165>\
**Category:** Uncategorized\
**Created:** [August 31, 2004, 1:08pm UTC](https://forum.kirupa.com/t/setting-property-of-duplicated-component/121165 "2004-08-31T13:08:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bape](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@bape](https://forum.kirupa.com/u/bape)\
**Post date:** [August 31, 2004, 1:08pm UTC](https://forum.kirupa.com/t/setting-property-of-duplicated-component/121165/1 "2004-08-31T13:08:38Z")

</div>

hi there, ive got a radiobutton component on my stage named radio1.  
I need to duplicate it and then change a few properties, but i cant seem to get the path/naming right. This is my code:

```auto

i=2;
radio1.duplicateMovieClip("radio"+i, radio1.getNextHighestDepth(), {_x:20, _y:20});
_root["radio"+i].setLabel("test");
i++

```

if i use a constant name instead of “radio”+i it works but the [“radio”+i] seems to be the problem, could someone help me with this? (using flash mx)
