# How to dynamically load a movieclip from the library from a string

**URL:** https://forum.kirupa.com/t/how-to-dynamically-load-a-movieclip-from-the-library-from-a-string/324462
**Category:** flash
**Created:** [August 22, 2011, 1:37pm UTC](https://forum.kirupa.com/t/how-to-dynamically-load-a-movieclip-from-the-library-from-a-string/324462 "2011-08-22T13:37:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Phenies](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@Phenies](https://forum.kirupa.com/u/Phenies)
#### Post date: [August 22, 2011, 1:37pm UTC](https://forum.kirupa.com/t/how-to-dynamically-load-a-movieclip-from-the-library-from-a-string/324462/1 "2011-08-22T13:37:27Z")

</div>

Throughout different times in my app I have to load, and then later on delete, a series of movieclips from the library.They all have the prefix “mc\_”.

```auto

var str_movieclip = "mc_" + get_current_movieclip_name();
//ex: mc_person1
var mc1:MovieClip = new str_movieclip;

```

Shows error:

> 

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

How do I do this?
