First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: Joachim Schnier | Website: http://www.cancerinform.net/

#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); 
}

» Level Intermediate

Added: 2002-06-29
Rating: 6 Votes: 65
(10 being the highest)
» Author
The author is a basic scientist doing cancer research.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: Inocreato
» Title: RaiseTheBlocks
» Description: Raise all the blocks to win the game
Featured Sound Loops
Image for equalize

Audio Player

» Author: TomCat Carty
» Title: The Wood
» Description: Just a little game ending or it can maybe be looped. Recorders with music box and percussion to give the feel of well, I don't know, the woods? Free to use, just credit me. thank you
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: Davisigner
» Description: Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.