johan
August 30, 2002, 10:08am
1
Hi everybody,
ive got a problem with a counter… i like to have it like this… its displays the time for 5 secs (ok, that no problem… here it comes…) theni want it to go to frame 2 and show that frame for 5 secs and back to frame 1 (almost like a loop)
is that possible? thanks in advance!!
Cheers!
/J.
system
August 30, 2002, 10:30am
2
//frame1
sec = getSeconds();
if (sec == sec + 5)
{
gotoAndPlay(2)
}
//frame2
sec = getSeconds();
if (sec == sec + 5)
{
gotoAndPlay(1)
}
might have to use an onEnterframe to call that, and getSeconds might not be the exact function, but something like that.
And using the Timer would probably be a better idea come to think of it, but I’m rusty there.
I’m not sure if this will work either, its late.
system
August 30, 2002, 10:58am
3
Hi,
Just put this code in the first frame
Function moveFrames(){
if(_currentframe == 1){
gotoAndStop(2);
} else {
gotoAndStop(1);
}
}
setInterval (moveFrames, 5000);
bye
SHO
system
August 30, 2002, 11:05am
4
man… eki… you have some nice code. Where you been hanging out in Moock’s ear??
system
August 30, 2002, 11:23am
5
I’ve working with Flash since version 2.
I’m too bussy to working with Flash to become a ‘Flash Star’.
U can see the latest thing we’ve done in:
www.4learning.co.uk/sos
And by the way… if u want know a ‘flash star’ visit
www.robertpenner.com
bye and thanks for ur comments…
SHO
system
August 30, 2002, 11:26am
6
Hi again David,
I thought u may be interested in having a look to
www.multisite.org
Where i publish some of my experiments
cya
SHO
system
August 30, 2002, 12:14pm
7
hey eki… you’re a star in my book. I judge such things on the nature and quality of scripts, not on any particular eye candy that’s been produced, or interesting web sites developed.
can’t believe we’ve got such an old timer here. Version 2.0… that’s a long time.
Watch eki guys… you’ll learn amazing things from his posts.
system
August 30, 2002, 1:04pm
8
Hi,
Thanks to you I’m flettered now with so many good comments about me… ;¬)
bye
SHO
system
September 29, 2002, 11:24am
9
I’m putting this in the Best of Kirupa until someone does a decent tutorial about setInterval.
pom
system
October 24, 2002, 8:07am
10
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, 500);
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
system
July 22, 2003, 12:48pm
11
Function moveFrames(){ <-- Capital ‘F’, should be lowercase ‘f’.
Regards,
Viru.
system
July 23, 2003, 4:38pm
13
some parts are
if
function
onClipEvent
etc
though any variable you make is not.
system
July 23, 2003, 5:08pm
15
system
July 23, 2003, 7:40pm
16
function is case senisitive.
Regards,
V.
system
July 23, 2003, 10:28pm
17
:**POM shoots himself in the head:
:everybody else wonders how he can be such a good AScripter =):