3 Replies Latest reply on Jun 7, 2010 12:21 PM by 99.9kelowna

    Dreamweaver 8 to CS5 slideshow issue

    99.9kelowna

      Created a slideshow in dreamweaver 8 that is java script based...  can not remember how I did it but I can see the code... currently it loops through once and I want to change this and change out the pictures.  I have a folder slideshow for the images but see only 8 in the coding.  again memory does not go back to 2006 when it was created so do not know if there were only 8 photos allowed or if they had to be a certain size etc. etc.  what is the best way to change this up as placement on page is all fine just want to refresh and add in more pics plus have it looping longer.

        • 1. Re: Dreamweaver 8 to CS5 slideshow issue
          Mylenium Most Valuable Participant

          Nobody can tell you without seeing the script code.

           

          Mylenium

          • 2. Re: Dreamweaver 8 to CS5 slideshow issue
            99.9kelowna Level 1

            I have never posted code before....   is there a trick?   I have changed out the pictures and can experiment adding more that is no problem and is easily done via coding...  just having a bit of a java moment to code the loop...

             

            <script type="text/JavaScript">

            <!--

            function MM_timelinePlay(tmLnName, myID) { //v1.2

              //Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Macromedia, Inc. All rights reserved.

              var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,propNum,theObj,firstTime=false;

              if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time

              tmLn = document.MM_Time[tmLnName];

              if (myID == null) { myID = ++tmLn.ID; firstTime=true;}//if new call, incr ID

              if (myID == tmLn.ID) { //if Im newest

                setTimeout('MM_timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay);

                fNew = ++tmLn.curFrame;

                for (i=0; i<tmLn.length; i++) {

                  sprite = tmLn[i];

                  if (sprite.charAt(0) == 's') {

                    if (sprite.obj) {

                      numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];

                      if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) {//in range

                        keyFrm=1;

                        for (j=0; j<sprite.values.length; j++) {

                          props = sprite.values[j];

                          if (numKeyFr != props.length) {

                            if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr];

                            else        sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr];

                          } else {

                            while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++;

                            if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {

                              if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1];

                              else        sprite.obj[props.prop2][props.prop] = props[keyFrm-1];

                    } } } } }

                  } else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);

                  if (fNew > tmLn.lastFrame) tmLn.ID = 0;

              } }

            }

             

            function MM_initTimelines() { //v4.0

                //MM_initTimelines() Copyright 1997 Macromedia, Inc. All rights reserved.

                var ns = navigator.appName == "Netscape";

                var ns4 = (ns && parseInt(navigator.appVersion) == 4);

                var ns5 = (ns && parseInt(navigator.appVersion) > 4);

                var macIE5 = (navigator.platform ? (navigator.platform == "MacPPC") : false) && (navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4);

                document.MM_Time = new Array(1);

                document.MM_Time[0] = new Array(1);

                document.MM_Time["myhat1"] = document.MM_Time[0];

                document.MM_Time[0].MM_Name = "myhat1";

                document.MM_Time[0].fps = 3;

                document.MM_Time[0][0] = new String("sprite");

                document.MM_Time[0][0].slot = 1;

                if (ns4)

                    document.MM_Time[0][0].obj = document["Image1"];

                else if (ns5)

                    document.MM_Time[0][0].obj = document.getElementById("Image1");

                else

                    document.MM_Time[0][0].obj = document["Image1"];

                document.MM_Time[0][0].keyFrames = new Array(1, 17, 34, 54, 73, 92, 111, 130);

                document.MM_Time[0][0].values = new Array(1);

                document.MM_Time[0][0].values[0] = new Array("../Images/slideshow/1.jpg","../Images/slideshow/2.jpg","../Images/slideshow/3.jpg" ,"../Images/slideshow/4.jpg","../Images/slideshow/5.jpg","../Images/slideshow/6.jpg","../I mages/slideshow/7.jpg","../Images/slideshow/8.jpg");

                document.MM_Time[0][0].values[0].prop = "src";

                document.MM_Time[0].lastFrame = 130;

                for (i=0; i<document.MM_Time.length; i++) {

                    document.MM_Time[i].ID = null;

                    document.MM_Time[i].curFrame = 0;

                    document.MM_Time[i].delay = 1000/document.MM_Time[i].fps;

                }

            }

            //-->

            </script>

            • 3. Re: Dreamweaver 8 to CS5 slideshow issue
              99.9kelowna Level 1

              Hi posted code as requested....