5 Replies Latest reply on Sep 23, 2009 9:15 AM by kglad

    XML - Go to Frame of movie rather than URL

    mach6ix

      Hi Everyone,

       

      Thanks in advance for reviewing my post.

       

      I wish to code my XML file (which is for a news scrolling componenet) so when a specific word is clicked, it forwards the user to a specific frame within the same movie....and not a URL address.

       

      The XML code being used

       

      <b>Client Retention - The Bevinco Approach</b>
      <p>Review this informative video webinar featuring the Bevinco parnters from our Client Acquisition webinar. Review some of Bevinco's most successful partners client retention stratagies and tactics</p>
      <a class="link" href="http://members.section.com" target="_blank">Click <b>HERE</b> to view this informative video.</a>

       

      The area listed in RED, is the section of XML code I belive I need to modify.

       

      I've HIGHLIGHTED an example image below for futher clarification as well.

       

      I would like the user to click the word "HERE" and have it forward them to a specific frame of the same movie. Something like a gotoAndStop(50) command but for XML

       

      example.jpg

       

      Any help is greatly appreciated.

       

      Cheers,

       

      Mike

       

        • 1. Re: XML - Go to Frame of movie rather than URL
          kglad Adobe Community Professional & MVP

          you'll use gotoAndStop(labelornumber) in your flash and place the label string or number in your xml.

          1 person found this helpful
          • 2. Re: XML - Go to Frame of movie rather than URL
            mach6ix Level 1

            Thanks for the reply K-Glad.

             

            you'll use gotoAndStop(labelornumber) in your flash and place the label string or number in your xml.

             

            However I'm not sure how to do what you are suggesting.

             

            I'm unaware about what you mean by placing a label string in my XML. Is it possible to provide an example via the code below?

             

            <b>Client Retention - The Bevinco Approach</b>
            <p>Review this informative video webinar featuring the Bevinco parnters from our Client Acquisition webinar. Review some of Bevinco's most successful partners client retention stratagies and tactics</p>
            <a class="link" href="http://www.mywebsiteaddress.comhttp://members.section.com/" target="_blank">Click <b>HERE</b> to view this informative video.</a>

             

            I need to know if the "gotoAndStop" sit's in this Actionscript as this is the actionscript "tied" to this component.

            Is there a specific place that the "gotoAndStop" command should reside within the Actionscript?

             

            The actionscript being used by the news component is:

             

            function loadXML(loaded) {
                if (loaded) {
                    xmlNode = this.firstChild;
                    article = [];
                    description = [];
                    main = [];
                    total = xmlNode.childNodes.length;
                    for (i=0; i<total; i++) {
                        description[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
                        main[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
                    }
                    firstArticle();
                } else {
                    content = "file not loaded!";
                }
            }
            xmlData = new XML();
            xmlData.ignoreWhite = true;
            xmlData.onLoad = loadXML;
            xmlData.load("training.xml");

             

            /*var xmlData = new XML();
            xmlData.ignoreWhite = true;
            xmlData.onLoad = function(success) {
            if (success) {
            main_txt.htmlText = xmlData.childNodes[0].childNodes[1].firstChild.nodeValue
            }
            };
            xmlData.load("training.xml");*/
            /////////////////////////////////////

             

            listen = new Object();
            listen.onKeyDown = function() {
            if (Key.getCode() == Key.LEFT) {
            prevArticle();
            } else if (Key.getCode() == Key.RIGHT) {
            nextArticle();
            }
            };
            Key.addListener(listen);
            previous_btn.onRelease = function() {
                prevArticle();
            };
            next_btn.onRelease = function() {
                nextArticle();
            };

             

            /////css for main text////

             


            ////////////////////////////////////
            p=0

             

            function firstArticle() {
                if (loaded == filesize) {
                    head_txt.text = description[0];
                    main_txt.htmlText = main[0];
                    article_num();
                }
            }
            function article_num() {
                current_pos = p+1;
                pos_txt.text = current_pos+" / "+total;
            }

             

            function nextArticle() {
                if (p<(total-1)) {
                    p++;
                    if (loaded == filesize) {
                        head_txt.text = description[p];
                        main_txt.htmlText = main[p];
                        article_num();
                    }
                }
            }
            function prevArticle() {
                if (p>0) {
                    p--;
                    head_txt.text = description[p];
                    main_txt.htmlText = main[p];
                    article_num();
                }
            }

             

            THANKS K-GLAD

            • 3. Re: XML - Go to Frame of movie rather than URL
              kglad Adobe Community Professional & MVP

              <b>Client Retention - The Bevinco Approach</b>
              <p>Review this informative video webinar featuring the Bevinco parnters from our Client Acquisition webinar. Review some of Bevinco's most successful partners client retention stratagies and tactics</p>
              <a href="asfunction:gotoF, yourframelabel">Click <b>HERE</b> to view this informative video.</a>

               

              function gotoF(label:String){
              gotoAndStop(label);
              }

              • 4. Re: XML - Go to Frame of movie rather than URL
                mach6ix Level 1

                K-GLAD

                 

                You have been a fantastic help. This worked instantly with no trouble/trial and error.

                 

                Greatly appreciated.

                 

                "Who's the man?...K-GLAD's the man"

                • 5. Re: XML - Go to Frame of movie rather than URL
                  kglad Adobe Community Professional & MVP

                  you're welcome.