4 Replies Latest reply on Nov 30, 2006 4:10 PM by Flexapp

    embedded image in itemrenderer

    thespark
      How can I load embedded image based on a string value or something?
      some code:

      [Embed(source="Tiedostot/Hymio/Hymio00.gif")]
      public var Hymio00:Class;
      ...
      [Bindable]
      [Embed(source="Tiedostot/Hymio/Hymio12.gif")]
      public var Hymio12:Class;

      <mx:columns>
      <mx:DataGridColumn headerText="Vieraskijan merkinnät" textAlign="center" fontFamily="Georgia" fontSize="15" fontWeight="bold" dataField="col1">
      <mx:itemRenderer>
      <mx:Component>
      <mx:VBox>
      <mx:Text fontFamily="Georgia" fontSize="12" fontWeight="normal" textAlign="right" text="{data.Nimi} kirjoitti:"/>
      <mx:Text fontFamily="Georgia" fontSize="12" fontWeight="normal" textAlign="right" htmlText="{data.Viesti}"/>
      <mx:Image source="{data.Kuva}"/>
      </mx:VBox>
      </mx:Component>
      </mx:itemRenderer>
      </mx:DataGridColumn>
      </mx:columns>

      i load those datagrid values from XML file.