1 Reply Latest reply on Jul 5, 2009 6:10 PM by kglad

    Add URL to XML Flash Menu

    beko75

      Hi guys,

       

      I have another flash menu where the text is pulled from the xml file. The only thing I need modified here is to be able to add URL to the link of the menu. You will see below on the XML CODE the name of the link is SERVICE.

       

       

       

      Please check the scripts below:

       

       

       

      ACTION SCRIPT CODE:

       

      function loadXML(loaded) {
          if (loaded) {
              _root.inventor = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
              service.text = _root.inventor;
          } else {
              content = "file not loaded!";
          }
      }
      xmlData = new XML();
      xmlData.ignoreWhite = true;
      xmlData.onLoad = loadXML;
      xmlData.load("/menu/service.xml");

       

       

      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

       

       

      XML CODE:

       

       

       

      <?xml version="1.0"?>

       

      <inventors>

       

      <person>
              <service>Service</service>
         
      </person>

       

      </inventors>

       

       

      <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

       

       

       

      I tried adding something like this but it wasn't working:


         
              <task="Service" ref="service.html"/>

       

       

       

       

      Please let me know if someone can handle this for.

       

      Thanks in advance.

       

      Beko

        • 1. Re: Add URL to XML Flash Menu
          kglad Adobe Community Professional & MVP
          use:

           

          function loadXML(loaded) {
              if (loaded) {
                  _root.inventor = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
                  service.text = _root.inventor;

          // url = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;

              } else {
                  content = "file not loaded!";
              }
          }
          xmlData = new XML();
          xmlData.ignoreWhite = true;
          xmlData.onLoad = loadXML;
          xmlData.load("/menu/service.xml");

           

           

          >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

           

           

          XML CODE:

           

           

           

          <?xml version="1.0"?>

           

          <inventors>

           

          <person>
                  <service>Service</service>

          <url>www.adobe.com</url>
             
          </person>

           

          </inventors>