0 Replies Latest reply on Apr 25, 2006 11:38 AM by Vanilla9999

    xml  getURL

    Vanilla9999
      I have two choices: to put the link either in the xml text or make the destination images mc for slideshow a button

      I tried to use a link (which would be much easier) in the xml text but it doesn't work. I need a pop up window. I've set the textfield to accept html tags and I thought the <a href> </a> tag was accepted in xml???

      So then I focused on the image container on the stage to act as a button as the slideshow ran. When you click the current image it would get the url stated in a pop of window. I tried so many variations my head hurts. I've looked on dozens of sites trying to incorporate different pieces of each. Nothing. Here is my code now. I'm sure there are errors since I was trying so many different solutions. Any light you can shed would be greatly appreciated!

      A sample of my xml:

      <Slides>
      <slideNode jpegURL="images/image1.jpg" refURL="HomeTest5.html">Houses</slideNode>
      <slideNode jpegURL="images/image2.jpg" refURL="HomeTest4.html">Interiors</slideNode>
      <slideNode jpegURL="images/image3.jpg" refURL="HomeTest3.html">Leaves</slideNode>
      </Slides>

      My code:

      slides_xml = new XML();
      slides_xml.onLoad = startSlideShow;
      slides_xml.load("slides.xml");
      slides_xml.ignoreWhite = true;

      function startSlideShow(success) {
      if (success == true) {
      rootNode = slides_xml.firstChild;
      totalSlides = rootNode.childNodes.length;
      firstSlideNode = rootNode.firstChild;
      currentSlideNode = firstSlideNode;
      currentIndex = 1;
      updateSlide(firstSlideNode);

      }
      }
      // THE INDENTED CODE IS WHAT I'M USING TO TRY AND GET THE URL'S IN A NEW WINDOW
      // Updates the current slide with new image and text
      function updateSlide(newSlideNode) {
      imagePath = newSlideNode.attributes.jpegURL;
      slideText = newSlideNode.firstChild.nodeValue;
      // refURL = newSlideNode.firstChild.attributes.refURL;
      loadMovie(imagePath, targetClip);
      // _root.targetClip.newSlideNode.attributes.jpegURL.myLink=refURL;
      // _root.targetClip.newSlideNode.attributed.jpegURL.onRelease=function(myLink)
      // {getURL(refURL, _blank);}
      _root.slideText.scroll=0
      }

      //
      // Event handler for 'Next slide' button
      next_btn.onRelease = function() {
      nextSlideNode = currentSlideNode.nextSibling;
      if (nextSlideNode == null) {
      break;
      } else {
      currentIndex++;
      updateSlide(nextSlideNode);
      currentSlideNode = nextSlideNode;
      }
      };
      //
      // Event handler for 'Previous slide' button
      back_btn.onRelease = function() {
      previousSlideNode = currentSlideNode.previousSibling;
      if (previousSlideNode == null) {
      break;
      } else {
      currentIndex--;
      currentSlideNode = previousSlideNode;
      updateSlide(previousSlideNode);
      }
      };
      stop();