2 Replies Latest reply on Oct 21, 2009 1:56 AM by Gu55tav

    XML Thumbnails in page flip problem (CS4)

    Gu55tav Level 1

      Okay...

       

      Ive been messing around with the free page flip and so far so good (many thanks to Ned Murphy of course!!).

       

      Ive added in an XML thumbnail gallery and all works fineapart from I cant get it to go to the corresponding page when clicked. I can get it to navigate to an external URL no problem but not to go to the page.

       

      Here is the AS2 script for the thumbnails...

       

      descriptions=true;
      alert._visible=false;
      var ease = 5;
      thumbs = new XML();
      thumbs.ignoreWhite=true;
      thumbs.load("thumbs.xml");
      thumbs.onLoad=function() {
          root=this.firstChild;
          total=root.childNodes.length;
          displayNum=Number(root.childNodes[0].attributes.displayNum);
          separation=Number(root.childNodes[0].attributes.separation);
          //settings
          w=Number(root.childNodes[0].attributes.w);
          h=Number(root.childNodes[0].attributes.h);
          mask._width=displayNum*(w+separation);
          mask._height=h+10;
          forward._x=mask._width+20;
          forward._y=back._y=h/2;
          mcs=[];
          for (i=0;i<total;i++) {
              mcs.push(i);
              newThumb=thumbnailer.container.duplicateMovieClip("container"+i,i);
              with (newThumb) {
                  _x=(w+separation)*i;
                  preloader._x=w/2;
                  preloader._y=h/2;
                  shape._width=w;
                  shape._height=h;
              }
              var image=root.childNodes[i].childNodes[0].firstChild.nodeValue;
              newThumb.desc=root.childNodes[i].childNodes[1].firstChild.nodeValue;
              newThumb.link=root.childNodes[i].childNodes[2].firstChild.nodeValue;
              newThumb.cont.loadMovie(image);
              newThumb.onRelease=function() {
                  getURL(this.link);
              }
              if (descriptions) {
                  newThumb.onRollOver=function() {
                      alert.desc=this.desc;
                      alert._visible=true;
                  }
                  newThumb.onRollOut=function() {
                      alert._visible=false;
                  }
              }
          }

       

      If anyone could give me any pointers that would be great.