Reload/Restart Slide in Slide Presentation
Quick Question. I'm using flash CS3 and making a flash slide presentation. How do I make it so when i press the "next slide" button, that the "next slide" starts from the first frame each time? Right now, when I have it set, if it has already played once, it stays at the end.
I'd like to to start from frame 1 each time I click next, or previous, and each time it does so. So that it automatically reloads that slides contents each time I go to that slide.
Right now, each "next slide" button only has:
Code:
on (release) {
// GoTo Next Screen behavior
var screen = null;
var target = this;
while((screen == null) && (target != undefined) && (target != null))
{
if(target instanceof mx.screens.Screen)
{
screen = target;
}
else
{
target = target._parent;
}
}
if(screen instanceof mx.screens.Slide)
{
screen.rootSlide.currentSlide.gotoNextSlide();
}
// End GoTo Next Screen behavior
}
Maybe try something like this...
// part of code on next button
if (screen instanceof mx.screens.Slide)
{
screen.rootSlide.currentSlide.nextSlide.gotoAndPla y (1);
screen.rootSlide.currentSlide.gotoNextSlide();
}
// part of code on previous button
if (screen instanceof mx.screens.Slide)
{
screen.rootSlide.currentSlide.previousSlide.gotoAn dPlay (1);
screen.rootSlide.currentSlide.gotoPreviousSlide();
}