PAusing for 5 secs - from the best of

Hi, I’ve just been trying to use the code below to pause for five seconds.

Function moveFrames(){
if(_currentframe == 1){
gotoAndStop(2);
} else {
gotoAndStop(1);
}
}
setInterval (moveFrames, 50;

but I get the following error message

Symbol=logomc, Layer=Layer 3, Frame=1: Line 1: ‘;’ expected
Function moveFrames(){

I’ve tried sticking a semi colon in almost everywhere with no luck, any ideas?? thanks

Danny

sorry for replying to myself but I have this code

Function; moveFrames(){
if(_currentframe == 1){
gotoAndStop(2);
} else {
gotoAndStop(1);
}
}
setInterval (moveFrames, 500);

it doesn’t pause at all, just plays as normal. am I misssing something, I did have it in a movie clip and I thought it could be that but I had the same problem when I tried it on the main timeline.

help?? :confused:

Hitby

You have a ; after function??

And what do you want to do exactly?

pom :q:

Hi, Don’t worry about that colon, its been everywhere and no where baby and thats where I’m at :slight_smile:

I’m simply trying to get a two frame movie clip to pause on the first frame for 5 seconds before playing the second frame in a loop, Sadly enough I’m trying to get a bear to wink every five seconds, don’t worry though it wasn’t my idea :slight_smile:

Cheers Hitby

Well, here’s an example. The code is really simple: if your clip is called clip then just write:

function moveFrame(){
	clip.play();
}
setInterval(moveFrame,5000 );

provided that there’s a stop action in the clip.

Cheers.

pom :elderly:

thanks very much works perfic loike :slight_smile: