# Dynamic load of library items

**URL:** <https://forum.kirupa.com/t/dynamic-load-of-library-items/295061>\
**Category:** flash\
**Created:** [August 24, 2009, 9:21pm UTC](https://forum.kirupa.com/t/dynamic-load-of-library-items/295061 "2009-08-24T21:21:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vattensork](https://avatars.discourse-cdn.com/v4/letter/v/5e9695/32.png) [@Vattensork](https://forum.kirupa.com/u/Vattensork)\
**Post date:** [August 24, 2009, 9:21pm UTC](https://forum.kirupa.com/t/dynamic-load-of-library-items/295061/1 "2009-08-24T21:21:50Z")

</div>

Hi.  
I’m new here and I have a problem.  
I have a couple of movieclips in my library (there’s 52 of them actually, I’m making a card game. :)) and I have them exported for actionscript through the property menu.  
Is it possible to load them by passing a variable with the name of the movieclip class?  
Something like:

function showCard( card:String ):void {  
var mc:MovieClip = new card();  
addChild( mc );  
};

showCard( ‘aceOfSpades’ );

I know this example doesn’t work but I hope it helps you understand what i want to do.
