2 Replies Latest reply on Dec 14, 2012 8:52 AM by jfb00

    Load many file XML

    cy3erbob

      Welcome.

      I am working with flex from 2 weeks and I have one problem.

      I have a panel that displays the images when the user hovers mouse on the thumbnail images in HorizontalList, at the bottom of the panel. Images in HorizontalList are taken from the XML file.

      I did today, 3 buttons and I would like something like this - when I click on the button 1 - load XML No. 1 in HorizontalList. When I click on the button 2 - load XML No. 2 in HorizontalList etc..

       

      <mx:XML id="xml" source="gallery.xml" />

          <mx:XMLListCollection id="xmlListColl" source="{xml.image}" />

          <mx:MenuBar fontFamily="Verdana" fontSize="11" fontStyle="normal" fontWeight="normal">

              <mx:Button label="button1" id="button1"/>

              <mx:Button label="button2" id="button2"/>

              <mx:Button label="button3" id="button3"/>

          </mx:MenuBar>

          <mx:Panel id="panel"

                  layout="absolute"

                  styleName="opaquePanel"

                  width="100%"

                  height="100%">

              <mx:Image id="img"

                      scaleContent="true"

                      horizontalCenter="0"

                      verticalCenter="0"

                      maintainAspectRatio="true"

                      width="250"

                      height="250"

                      completeEffect="Fade" />

              <mx:ControlBar>

                  <mx:HorizontalList id="horizontalList"

                          dataProvider="{xmlListColl}"

                          labelField="lbl"

                          iconField="src"

                          itemRenderer="CustomItemRenderer"

                          columnCount="4"

                          columnWidth="125"

                          rowHeight="100"

                          width="100%"

                          horizontalScrollPolicy="on"

                          change="horizontalList_change(event);"

                          itemRollOver="horizontalList_itemRollOver(event);"

                          itemRollOut="horizontalList_itemRollOut(event);"

                          doubleClickEnabled="true"

                          doubleClick="horizontalList_doubleClick(event);" />

              </mx:ControlBar>

          </mx:Panel>

       

      </mx:Application>

       

      Can anybody help me to do this, please?