Search Tutorials
#include "frame4.txt"Here we have an external script for a slide frame. You will find a number of external scripts, which contain functions, where we can change arguments. To load the scripts into the swf file open the fla file and without changing anything export the swf file. The moveSlide function can be extended up to the number of slides we want to show. Just add more of the individual subfunctions for each slide. The clearInterval function we have encountered in a previous frame will completely inactivate any setInterval command, in particular of the last slide. However, for each slide frame we have to make this function new and give it a new name. We also create an introductory slide to start the slideshow. The delay has to be set in equal time intervals such as 1000, 2000, 3000 or 2000, 4000, 6000 as shown here.
//will load the thumbnails
preView(1,3,"nail_");
//preloading slides
_root.loadAll(1,3,"slidea_","introslide.jpg");
//automatic slide show using setInterval and clearInterval
function moveSlide_1() {
//unloading the textfield
percentOutput = "";
slide_1 = new Object();
slide_1.interval = function() {
_root.slideHolder.loadMovie("slidea_1.jpg");
loadSlidetext("slidea_",1);
}
myTimer1 = setInterval( slide_1, "interval", 2000);
slide_2 = new Object();
slide_2.interval = function() {
clearInterval(myTimer1);
_root.slideHolder.loadMovie("slidea_2.jpg");
loadSlidetext("slidea_",2);
}
myTimer2 = setInterval( slide_2, "interval", 4000);
slide_3 = new Object();
slide_3.interval = function() {
clearInterval(myTimer2);
_root.slideHolder.loadMovie("slidea_3.jpg");
loadSlidetext("slidea_",3);
}
myTimer3 = setInterval( slide_3, "interval", 6000);
}
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||
|