1 Reply Latest reply on Aug 22, 2009 9:14 PM by kglad

    Make Action Script connect to XML link

    djukha

      Hi,

      Please if somebody can help me with this issue.

       

      I have Flash Movie (with multiple movie symbols) file that parses XML file(gallery.load("gallery.xml") with this

       

                 <image>
                  <date>03.31.06</date>
                  <title>View of Seattle</title>
                  <desc>View of Seattle</desc>
                  <thumb>seattle5.jpg</thumb>
                  <img>seattle5.jpg</img>
              </image>

              <image>
                  <date>03.31.06</date>
                  <title>View of New York</title>
                  <desc>View of New York</desc>
                  <thumb>New York.jpg</thumb>
                  <img link="http://www.newyork.com">New York</img>
              </image>

       

       

      Action Script places first image in Flash File new movie symbol (new window).

                this.onRelease = function()

                showFullImage(this.imgToLoad, this.imgDesc);

       

      My problem is:

                 i need to connect to image or to http

                 depending on the tag in xml.

       

                 In first example <thumb>Seattle5.jpg</thumb> button click will send image to Flash movie new window while

                 <thumb>New York.jpg</thumb> click will open http://www.newyork.com

       

                this.onRelease = function()

                showFullImage(this.imgToLoad, this.imgDesc);

       

                i need to diferentiate here to let the ActionScript know that there is link present in XML

       

               getUrl(Link, "_blank");

       

       

       

      How can i make this split in Actionscript.

       

      Thank you