3 Replies Latest reply on Dec 12, 2010 9:03 PM by Flex harUI

    getDefinitionByName and forcibly import issue

    Benoitcn Level 1

      I try to create some instance dynamically but these dynamic classes don't have any instances in this file with hard-code.

      So the compiler can't find the path of the class, is there any way to make the compiler

      import some packages forcibly without declare any instance of any class hard-code in the file.


      ReferenceError: Error #1065: Variable GetPersonInfoCommand is not defined.
      at global/flash.utils::getDefinitionByName()


         var command:Class;
         for each( var eve:String in evtArr.eventsArr ){
          command = getDefinitionByName("frameworks.com.esint.command." + eve + "Command") as Class;
          addCommand(eve, command, true);