2 Replies Latest reply on Mar 22, 2010 9:36 PM by Flex harUI

    [EMBED (source="????")] - using dynamic source?

    smon_ed Level 1

      dynamic button skinning - I can't believe I've spent so long trying to do this..............


      I have my spark Button loading an icon using the embed metadata tag:



      private var _icon:Class;


      yay - that works!!!


      However, I'm not entirely sure how to get the embed tag to recognise my file reference as a dynamic/concatenated string:


      var myFilePath:String = imgPath+"icon"+varNum+".png";


      private var _icon:Class;


      That doesn't work:


      'myFilePath' does not have a recognized extension, and a mimeType was not provided IconButton.as /Copy of IconButtonDemo/src line 22 Flex Problem
      Unable to transcode myFilePath. IconButton.as /Copy of IconButtonDemo/src line 22 Flex Problem


      How does one go about creating that file reference for the embed tag to read properly???  I'm going to need it, so I can build the file path from dynamic data and looping, etc.


      As always, thanks in advance... I'm learning alot from reading here today.