2 Replies Latest reply on Jan 11, 2010 8:19 AM by lkenney2

    Embedding XML Icon

    lkenney2

      The line of code causing the problem is:

       

      <mx:Button id="btnStoryListen" icon="@Embed(source='{xmlData.button.(@type=='btnListen').icons}')"/>

       

      This generates the error:

       

      "1067: Implicit coercion of a value type String to an unrelated type Class."

       

      The xml looks like this:

       

      <button position='null' type='btnListen'>
        <x>null</x>
        <y>null</y>
        <icons>CorporateImages/btnStoryLis.png</icons>
        <downIcons>CorporateImages/btnStoryLisD.png</downIcons>
        <overIcons>CorporateImages/btnStoryLisO.png</overIcons>
      </button>

       

      Is there anyway to make this work?