2 Replies Latest reply on May 9, 2011 2:23 PM by neoX286

    casting bytearray to class

    neoX286 Level 1

      Hey guys,

       

      I have a utility class I wrote that goes out at startup and loads all of my image assets and stores their bytearray data into a cache.  I can then access any image I want by it's name at any time.  This works great for everything I've used it for thus far, except for a Tree component's icon.  The icon function is expecting to return a 'Class' type and I have my data as a 'ByteArray' type.  Normally I'd be using the bytearray data as the 'source' property for an image component, but that doesn't work here.

       

      How can I convert my bytearray into a Class type?  Normally you would use an embed, but I have already retrieved the data I need.