# Movieclip from variable

**URL:** <https://forum.kirupa.com/t/movieclip-from-variable/314824>\
**Category:** Uncategorized\
**Created:** [October 9, 2010, 7:01pm UTC](https://forum.kirupa.com/t/movieclip-from-variable/314824 "2010-10-09T19:01:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![radi](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@radi](https://forum.kirupa.com/u/radi)\
**Post date:** [October 9, 2010, 7:01pm UTC](https://forum.kirupa.com/t/movieclip-from-variable/314824/1 "2010-10-09T19:01:44Z")

</div>

im trying to load a movieclip by a name passed threw a variable

```auto
var loader2:URLLoader = URLLoader(event.target);    
var sc:URLVariables = new URLVariables(loader2.data);
boxes[0].text = sc["Type1"];
temp = this.addChild(new sc["Type1"]);

```

sc[“Type1”] is equal to Archer  
if i use  
temp = this.addChild(new Archer());  
it works correctly  
so it isn’t a Typo

i get this error

TypeError: Error #1007: Instantiation attempted on a non-constructor.
