I guess the Summary says it all. A very beginner question I know...but gotta start somewhere.lol Basically like to know if I have 2 or 3 scenes how could I pause for a couple of seconds between them therefore creating a comfortable viweing time....???? Thanks!
look at setInterval(); delayFunction = function(clip){ clearInterval(thisDelay); clip.play(); // or whatever action } thisDelay = setInterval(delayFunction,5000,this); // delay of 5 seconds cheers
Thanks so much! Now do I just copy this : _____________________________________ look at setInterval(); delayFunction = function(clip){ clearInterval(thisDelay); clip.play(); // or whatever action } thisDelay = setInterval(delayFunction,5000,this); // delay of 5 seconds .....whole thing into the script?????? Would this be correct???? _______________________________________ stop(); //stops the playhead at frame 15 stop(); look at setInterval(); delayFunction = function(clip){ clearInterval(delayFunction,15000,this); clip.play(); // or whatever action } thisDelay = setInterval(delayFunction,5000,this); // delay of 5 seconds nextScene();
Put this code on the last frame of every scene: stop(); delayFunction = function(clip){ clearInterval(thisDelay); clip.play(); }
no... If you want that more re-usable then something like this... myDelayFunction = function(clip,frame){ clearInterval(myDelay); clip.gotoAndPlay(frame); } myDelay = setInterval(myDelayFunction,15000,this,"frameLabel"); Now in that example, what you are looking at is that the last line is the only thing that needs to change... myDelay is setting a call to a function called myDelayFunction at an interval of 15 seconds and it is passing in two parameters, the first is the timeline that it resides on (and more importantly, the timeline we are going to play on) and then the second parameter is the frameLabel that we want to go to. so if you needed to re-use this later, the you use the same basic construction... myDelay = setInterval(myDelayFunction,15000,this,"otherFrameLabel"); There is much discussion on this forum about the use of setInterval and my original example covers the basic implementation. If you know in advance how long each interval is to be, then it is possible to pass in an array of times and frameLabels and deal with them all in one function. Check the archives for other examples of using setInterval cheers
Don't see what you're looking for? Try a search.
|