# Dynamic object

**URL:** <https://forum.kirupa.com/t/dynamic-object/248931>\
**Category:** Uncategorized\
**Created:** [January 13, 2008, 5:28pm UTC](https://forum.kirupa.com/t/dynamic-object/248931 "2008-01-13T17:28:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavel](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@pavel](https://forum.kirupa.com/u/pavel)\
**Post date:** [January 13, 2008, 5:28pm UTC](https://forum.kirupa.com/t/dynamic-object/248931/1 "2008-01-13T17:28:18Z")

</div>

hi!

im trying to dynamically create objects, getting their name from an array and depth from a for loop… i realize i probably need to use a function, but i just dont see how i can do it…  
thats what i have so far…

ffunction create(name, depth) {

```
            return (createEmptyMovieClip (name, depth));
        };
        
        
        this.create (uname, num);

```

now, uname is a name of an object (if i trace it, it gives me the right name) , and num = i+2(also traces fine).

can someone please help me with this?
