2 Replies Latest reply on Aug 6, 2007 11:02 AM by dr_ross

    String to Library Class conversion

    dr_ross Level 1
      Hi guys, i'm having trouble coming up with a good way to convert a string to class reference from the library without using a lookup table in Actionscript 3.0

      so say i'd loaded in some data from xml and i need to generate a new instance of a "Box" from a linked extended Sprite in the library.

      without the string i'd just go var myBox = new Box();

      but obviously i can't go var myBox = new "Box"() so i'm kind of stuck without using a lookup table to convert the string passed to the appropriate Class linkage.

      Any help would be much appreciated,