# createEmptyMovieClip(variableName,level)

**URL:** https://forum.kirupa.com/t/createemptymovieclip-variablename-level/166234
**Category:** flash
**Created:** [October 18, 2005, 9:31am UTC](https://forum.kirupa.com/t/createemptymovieclip-variablename-level/166234 "2005-10-18T09:31:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ceko](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@ceko](https://forum.kirupa.com/u/ceko)
#### Post date: [October 18, 2005, 9:31am UTC](https://forum.kirupa.com/t/createemptymovieclip-variablename-level/166234/1 "2005-10-18T09:31:08Z")

</div>

the problem:

I want to write a function generateClip(variableName) in order to generate moviclieps on the scene and i need the movies to have their instancenames called after “variableName” parameter

this is what I did

```auto
 
 
function generateClip(variableName){ 
_root.createEmptyMovieClip(variableName,10); 
} 
_root.generateClip(myclip1); 
 

```

i’m debuging and the result is that I don’t have the movie clip “myclip1” on the root, but only:

Movie Clip: Frame=0 Target="\_level0.undefined"

![](http://learn.reflex.ro/images/smiles/icon_cry.gif) ![](http://learn.reflex.ro/images/smiles/icon_cry.gif)  
what have i done wrong?
