# String in variable as classname?

**URL:** <https://forum.kirupa.com/t/string-in-variable-as-classname/186292>\
**Category:** Uncategorized\
**Created:** [April 20, 2006, 10:43am UTC](https://forum.kirupa.com/t/string-in-variable-as-classname/186292 "2006-04-20T10:43:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laaf](https://avatars.discourse-cdn.com/v4/letter/l/7bcc69/32.png) [@Laaf](https://forum.kirupa.com/u/Laaf)\
**Post date:** [April 20, 2006, 10:43am UTC](https://forum.kirupa.com/t/string-in-variable-as-classname/186292/1 "2006-04-20T10:43:31Z")

</div>

Heylo!

Does anyone know how to put a variable string as a class name?  
I’m loading certain variables from a XML file as follows:

temp\_template = db\_vars.childNodes[1].childNodes\*.childNodes[2].childNodes[0];

db\_vars is a XML variable.  
Now I’d like to declare ‘template’ as a class object. The name of the class is in ‘temp\_template’.

var template:temp\_template;

won’t work… anyone any idea how to handle this? thanks!
