2 Replies Latest reply on Feb 1, 2011 4:18 AM by kiran7881

    Displaying Images based on XML Tags

    kiran7881 Level 1

      Hi ,

       

      Till now i used to get only One Image from my XML Response and dispplayed that using below code .

      But now , 2 More Images have added in the form of SecondImage Tag and ThirdImage Tag on the XML Resposne .

       

       

      <?xml version="1.0"?>
      <gallery>
           <img>
               <FirstImage>1.jpg</FirstImage>
           <SecondImage>2.jpg</SecondImage>
               <title>Warhol & Basquiat</title>
           </img>
           <img>
               <FirstImage>1.jpg</FirstImage>
               <title>Beethoven Yellow Book</title>
           </img>
           <img>
               <FirstImage>1.jpg</FirstImage>
           <SecondImage>2.jpg</SecondImage>
           <ThirdImage>3.jpg</ThirdImage>
               <title>Marilyn Monroe</title>
           </img>
          </gallery>

       


      <mx:Image id="delImage" source="{getImages()}"  visible="true" autoLoad="true" cachePolicy="on" />


      private function getImages():String
                      {
                        return gallery.img.FirstImage;
                      }


       


      Now after displaying the First Image i want to have a Arrow mark on it  to display Second and ThirdImage if they exist .

      (Dont want the Arrow Mark if the Images doesn't exist )

      Could you please provide me any tips for doing this ??