Flash 8 Slide Presentation help with slide navigation, please
I think I finally found the right place to post this.
I am simply trying to go from one slide to the next slide using a timer within a slide document in Flash 8.
The behaviors I can attach are great for interaction like, go to next slide, and go to first slide, but how do I get any of those behaviors to trigger based on a timer, using action script, instead of navigating from slide to slide triggered by the action of the user?
The client wants an auto slideshow on the front page of the site, and I am freaking out.
You can use setInterval to set the time, in milliseconds, you want to wait until the slide advances.
Try this code on the timeline of your slide, it'll advance to the next slide after 5 seconds.
code:
function goNext(){
gotoNextSlide();
clearInterval(timer);
}
var timer = setInterval(goNext, 5000);
"What really bugs me is that my mom had the audacity to call Flash Kit a bunch of 'inept jack-asses'." - sk8Krog
...and now I have tape all over my face.
You'll notice, that when the photo on the right loads, a few seconds pass, then it fades out, with the next photo fading in... this is the exact behavior that occurs when you click on the photo as well.
When the final slide is reached (the photo with the military men), the auto push with my code above does not push to the first slide. It just chokes. The only way at this point to advance to the first slide, is to click on the final slide.
Also, once the photos cycle through, if the user does click on the final slide to advance to the first slide, the first slide just sits there, and the timer functionality does not kick in to automatically advance to the next slide.
Okay, now I have the last slide going to the first slide. I did this:
function goFirst(){
_parent.rootSlide.gotoFirstSlide();
clearInterval(timer);
}
var timer = setInterval(goFirst, 4000);
But I am still having a problem getting the slides to auto advance once the second cycle of slide play begins. I am using stop() on each slide's timeline, because if I don't, it's a mess, so do I now invoke play() somewhere?
I apologize if this is a newbie problem. I have been using Flash for the first time, only three weeks now, and I'm starting with Flash 8 Pro, but if I can get some help on this, I won't bother the forum with this type of simple question again. I've just had a tough time making sense of the help with slides in the docs. Thanks in advance.
it turns out that flash slide presentations have unique issues regarding focus. I used the following code, making it more specific to the slide I want, and it works. Hope this helps someone else, because no one should have to go through the tears I have shed.
stop();
function goNext(){
_parent.currentSlide.gotoNextSlide();
clearInterval(timer);
}
var timer = setInterval(goNext, 4000);
I just found this thread and it saved me a lot of time. Thanks guys. Just a note to anyone else on here, it took me a while to figure where to put these bits of script. I've now sussed that by putting them within the action script for each screen. With a transitions on the screen, this gives me this:
I was having the same issue trying to understand how the slide show could work without interaction. Thank you SO much for posting that code, SnowKrash. It saved me a lot of time and frustration!
it turns out that flash slide presentations have unique issues regarding focus. I used the following code, making it more specific to the slide I want, and it works. Hope this helps someone else, because no one should have to go through the tears I have shed.
stop();
function goNext(){
_parent.currentSlide.gotoNextSlide();
clearInterval(timer);
}
var timer = setInterval(goNext, 4000);
Hi there, I need ur help for flash slide presentation.....I want to make auto slide presentation exactly like the way you have done it. Flash slide presentation document has slide 1 & slide 2 . Each slide has 2 child slides......I have used the same code which you had used for your client website......But some how I am still struggling to get it done....I have used code below:
stop();
function goNext(){
_parent.currentSlide.gotoNextSlide();
clearInterval(timer);
}
var timer = setInterval(goNext, 4000)
You can use setInterval to set the time, in milliseconds, you want to wait until the slide advances.
Try this code on the timeline of your slide, it'll advance to the next slide after 5 seconds.
code:
function goNext(){
gotoNextSlide();
clearInterval(timer);
}
var timer = setInterval(goNext, 5000);
Hi there,
I need ur help regarding flash auto play slide presentation. I did try ur above code but some how I can see 2 slides and then it jump to last slide....
I want to creat simple photo slide show using slide presentation feature....
YES!
@SnowKrash: - I had exactly the same issues, I posted my question on this forum with no answer. I guess it's all in the phrasing of the question. Many thanks.
Your scoping does work and it brings the slideshow to the first slide. Thanks
But my first slide has a timeline animation and goFirst() brings it on it's last frame, where it stops and doesn't execute the goNext().
It would be fun if gotoAndPlay(1) worked after gotoFirstSlide() in the function but it doesn't.... There must be another way to Restart the whole slide show.
For all slides (with and without timeline animations) I put stop(); on the last keyframe of the timeline animation or on the first frame of no-timeline slides.
eventObj.target.__transitionManager._triggerEvent = eventObj.type;
}
// End Transition behavior
gotoAndPlay(1)
function goNext(){
_parent.currentSlide.gotoNextSlide();
clearInterval(timer);
}
var timer = setInterval(goNext, 4000);
}
On the last slide I replace the goNext() definition by the goFirst() one:
function goFirst(){
_parent.rootSlide.gotoFirstSlide();
;
clearInterval(timer);
}
var timer = setInterval(goFirst, 4000);
}
It's the gotoAndPlay(1) that seems to do the trick "Restart" and the on hide transition that will get rid of the previous slide while revealing the current one. I have attached a short .FLA file that demos it.
Thanks a million to the both of you for the input.
I would like to be able to advance the slides in a Flash presentation without waiting for the slide to finish (the "Next" button does not light up enabling advancement until the slide plays out).
Does anyone know a "hotkey" or way to advance slides before the slide finishes playing so I can test the presentation without watching the whole thing. It's a couple hours long (each slide around 2-5 mins) so I need to advance through the presentation to view it quicker.