# getDefinitionByName Problem

**URL:** <https://forum.kirupa.com/t/getdefinitionbyname-problem/305777>\
**Category:** Uncategorized\
**Created:** [March 3, 2010, 12:59pm UTC](https://forum.kirupa.com/t/getdefinitionbyname-problem/305777 "2010-03-03T12:59:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![e\_owen](https://avatars.discourse-cdn.com/v4/letter/e/df788c/32.png) [@e\_owen](https://forum.kirupa.com/u/e_owen)\
**Post date:** [March 3, 2010, 12:59pm UTC](https://forum.kirupa.com/t/getdefinitionbyname-problem/305777/1 "2010-03-03T12:59:35Z")

</div>

I am having trouble getting the getDefinitionByName method to work. I need to dynamically instanciate classes as part of a Quiz ( Question1, Question2, etc ).

```auto
private static const CLASS_PATH:String = "com.ea.application.view.questions.";

```

```auto
var _classRef:Class = getDefinitionByName( CLASS_PATH.concat( "Question", _num.toString() ) ) as Class;

```

_ **ReferenceError: Error #1065: Variable Question1 is not defined.** _

There is no problem getting some of the other classes in the same folder so the paths are right.
