# Create new MovieClipLoader dynamically

**URL:** <https://forum.kirupa.com/t/create-new-moviecliploader-dynamically/248791>\
**Category:** flash\
**Created:** [January 11, 2008, 4:35pm UTC](https://forum.kirupa.com/t/create-new-moviecliploader-dynamically/248791 "2008-01-11T16:35:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![enchance](https://avatars.discourse-cdn.com/v4/letter/e/85e7bf/32.png) [@enchance](https://forum.kirupa.com/u/enchance)\
**Post date:** [January 11, 2008, 4:35pm UTC](https://forum.kirupa.com/t/create-new-moviecliploader-dynamically/248791/1 "2008-01-11T16:35:20Z")

</div>

How do you create new MovieClipLoader instances dynamically? Like supposing I want to create 20 new MovieClipLoader using while with names “mcl1”, “mcl2”, “mcl3…”, how does it work? I have my code below but I keep getting syntax errors

```auto
var i:Number = 1; 
while(i <= 20){ 
var _root["mcl" + i]:MovieClipLoader = new MovieClipLoader(); //error in this line 
i++; 
}

```

Is there a way to do this or should I write all 20 one by one instead?
