# Addchild with variating name

**URL:** <https://forum.kirupa.com/t/addchild-with-variating-name/285274>\
**Category:** Uncategorized\
**Created:** [March 29, 2009, 9:28pm UTC](https://forum.kirupa.com/t/addchild-with-variating-name/285274 "2009-03-29T21:28:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lsarcher](https://avatars.discourse-cdn.com/v4/letter/l/d9b06d/32.png) [@lsarcher](https://forum.kirupa.com/u/lsarcher)\
**Post date:** [March 29, 2009, 9:28pm UTC](https://forum.kirupa.com/t/addchild-with-variating-name/285274/1 "2009-03-29T21:28:22Z")

</div>

I want to loop and put on several movieclips which are named Node1 to Node15. How do i add them and access them afterwards? Tried to give it a name and access it afterwards, but had no luck.

my messy code looks like:

```auto

i++;
var newnode:Node* = new Node*();
newnode.name=i;

addChildAt(newnode,i);

newnode.1.x=10;
newnode.2.x=40;
....
newnode.15.x=440;

```

i still have lots of troubles with the syntax, but i would be glad if someone could help

thx  
kami
