4 Replies Latest reply on Feb 12, 2013 9:18 AM by Flex harUI

    getDefinitionByName() gives error #1065

    iamcootis Level 1

      So I have my code written like this.

      var classReference:Class = getDefinitionByName("Widget") as Class;
      var instance:Object = new classReference();


      And I realize I am getting this error because I have no other instance of Widget anywhere and so it's not being compiled. Let's say I have 100 different classes that I need to use getDefinitionByName() ...Is there a way I can get around this without having to have:


      var classReferene:Widget;