# Dynamic Construtors

**URL:** <https://forum.kirupa.com/t/dynamic-construtors/256100>\
**Category:** flash\
**Created:** [March 30, 2008, 7:31pm UTC](https://forum.kirupa.com/t/dynamic-construtors/256100 "2008-03-30T19:31:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![motionsmith](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@motionsmith](https://forum.kirupa.com/u/motionsmith)\
**Post date:** [March 30, 2008, 7:31pm UTC](https://forum.kirupa.com/t/dynamic-construtors/256100/1 "2008-03-30T19:31:11Z")

</div>

Is it possible to initiate a class based on a String of the class name?

Here’s the code that I WANT to work, but it doesn’t:

```auto

var className:String;

//get the class name from XML
....

var character:Character = new [className](properties) as Character;

```

I’ve also tried using the .constructor() method to instantiate it. That doesn’t error out, but it doesn’t instantiate the class either. Just turns out to be _null_.

Are dynamic constructors possible?

Thanks,  
Eric
