Groups | Blog | Home
all groups > flash actionscript > may 2004 >

flash actionscript : Newbie question


nicorawa
5/3/2004 11:33:45 PM
I have a slide show with let's say 3 images. I use a transition between each
image and I would like to "pause" the slide show on each image for a certain
amount of time, the send it to the next frame.

Can I use a function for this?

function timeLine(thisNum,next)
{
if (getTimer() < thisNum)
{
stop ();
timeLine(thisNum);
}
else
{
gotoAndPlay (next);

}
}

timeLine(10000,2);
mandingo
5/3/2004 11:43:20 PM
Hi,

Use setInterval.

function timeLine() {
pictureViewing++;
if (pictureViewing<=3) {
stop();
clearInterval(myTimeDelay);
} else {
gotoAndPlay(pictureViewing+1);
}
}

myTimeDelay = setInterval(timeLine,10000);

I don't know the rest of your code but something like that should do it...

hope that helps
cheers,
mandingo
5/3/2004 11:44:17 PM
oooops that should have been

if (pictureViewing>=3) {

AddThis Social Bookmark Button