5 Replies Latest reply on Aug 20, 2010 5:20 AM by oberoiT

    embedding asset in flex at compile time





      Is it possible to embed assets like images, videos in flex using <mx:script>? I am aware of the embed meta tag of actionscript


      public var imgCls:Class;


      This method needs source name to be mentioned for the source parameter.but in my case the image paths are read from some file so the image to be embeded depends upon the string read from the file(xml file) and the embed tag cannot be use directly.


      Is there a way to use the embed tag with the source parameter initialized with the variable like


      [Embed(source=some variable)]
      public var imgCls:Class;




      Is there any way to embed them at compile time after reading the file ?