0 Replies Latest reply on May 11, 2007 9:41 AM by Clarence_69

    charge image from xml

      Hello at All,
      create the script in Flex and I wish to import the image from XML script. The script works for the text but not for image. ote I made a parsig of xml and it works very well. I start from php code to build the xml. However I post the xml code. Could to correct the script to import the image? Thanks. I remember you the script works and the data are charged but the not the image. I hope you help me :) Thanks

      Flex Builder 2.0 script:

      <?xml version="1.0" encoding="utf-8"?>

      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" horizontalAlign="left" width="1566" layout="horizontal"

      var selectedItem:Object;


      <mx:Model id="ItemModel" source=""/>

      <mx:Panel title="News" horizontalAlign="left" verticalAlign="bottom" layout="horizontal">
      <mx:DataGrid id="DG" width="210" dataProvider="{ItemModel.item}" change="selectedItem=DG.selectedItem" textAlign="center" enabled="true">
      <mx:DataGridColumn dataField="ID" headerText="ID" width="20"/>
      <mx:DataGridColumn dataField="Codice" headerText="Codice" width="60"/>
      <mx:DataGridColumn dataField="desc" headerText="description" visible="false"/>
      <mx:DataGridColumn dataField="price" headerText="Price" width="90"/>
      <mx:DataGridColumn dataField="image" headerText="image" width="90" visible="false"/>

      <mx:Panel title="Dettaglio" width="311" height="193" horizontalAlign="right" fontWeight="bold" color="#ffffff">
      <mx:Label text="{DG.selectedItem.desc}" fontWeight="bold" color="#804000" fontSize="12" width="264" height="140"/>
      <mx:Panel title="Dettaglio" width="186" height="193" horizontalAlign="right" fontWeight="bold" color="#ffffff">
      <mx:Image source="{selectedItem.image}" width="150" height="140"/>


      the xml file:
      <?xml version="1.0" encoding="utf-8" ?>
      - <elenco>
      <item ID="1" Codice="ASDF" desc="software" price="26" />
      <item ID="2" Codice="FFR" desc="sw descrittivo" price="50" />
      <item ID="3" Codice="GFT" desc="Frutta ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddddd" price="80" />