0 Replies Latest reply on Aug 3, 2007 10:41 PM by DeadKnight

    About the reflection

    DeadKnight
      Is there any way to use custom classes with reflection?
      I mean dynamicly creat the object instance of the custom class ,without declare in the programme
      package {
      import com.customtypes.string; // Custom String Implementation Class
      import flash.utils.getDefinitionByName;

      public class GetDefinitionByNameExample {
      public function GetDefinitionByNameExample() {
      var ClassReference:Class = getDefinitionByName(“com.customtypes.string”) as Class;
      var instance:Object = new ClassReference();
      instance.customParameter = “my parameter”;
      }
      }
      }
      The proramme will give a error ......

      Is there any way to do it ?