-
1. Re: help with repeating frame delay
kglad Sep 30, 2010 5:09 PM (in response to tinathpot)1 person found this helpfulin frame 1 of your swf, use:
//////////////////////////////////////
autoAdvanceF();
stop();
function wait() {
play();
}function autoAdvanceF(){
clearInterval(myInterval);
myInterval = setInterval(wait, 15000);}
//////////////////////////////
and your play button should use:
autoAdvanceF();
-
2. Re: help with repeating frame delay
tinathpot Sep 30, 2010 5:25 PM (in response to kglad)I don't know if I did something wrong but I get this error when I do that:
//////////////////////////////////////
**Error** Scene=Scene 1, layer=navigation, frame=1:Line 1: Statement must appear within on handler
autoAdvanceF();Total ActionScript Errors: 1 Reported Errors: 1
//////////////////////////////////////
I mean I only put
//////////////////////////////////////
autoAdvanceF();
//////////////////////////////////////
into the button action, nothing else...
is something else supposed to go with it?
I don't know action script, I just sort of paste stuff and sometimes it works.
EDIT
sorry I'm an idiot.
on (release) {
autoAdvanceF();
}ok got that now.
but when I do that what you said, put that first code into the first frame action, and that second code into the button action, the movie doesn't play at all
Message was edited by: tinathpot
-
3. Re: help with repeating frame delay
tinathpot Sep 30, 2010 5:29 PM (in response to tinathpot)Actually no, I see now, it makes the first frame last 15 seconds. But that's not what I want. My pause begins on frame 16. Then it plays. Then it pauses again on frame 51. Then it plays. Then it pauses again on frame 88. And so on.
The button also doesn't work at all with
on (release) {
autoAdvanceF();
}guess I'm still doing something wrong
-
4. Re: help with repeating frame delay
kglad Sep 30, 2010 9:09 PM (in response to tinathpot)no code should be attached to objects.
use instance names for you buttons and apply listeners to your buttons.
-
5. Re: help with repeating frame delay
tinathpot Oct 1, 2010 4:26 AM (in response to kglad)Ok... I'm sorry but I don't know what "apply listeners to buttons" means... can you explain in more detail? How do I do that?
-
6. Re: help with repeating frame delay
kglad Oct 1, 2010 6:41 AM (in response to tinathpot)instead of:
on (release) {
autoAdvanceF();
}you should assign your next button an instance name (eg, nextBtn) and attach to a frame that contains your button:
nextBtn.onRelease=function(){
autoAdvanceF();
//other code
}
-
-
8. Re: help with repeating frame delay
kglad Oct 1, 2010 7:59 AM (in response to tinathpot)you're welcome.