|
|
|
#1 |
|
Junior Member
Join Date: May 2007
Posts: 14
|
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
}
|
|
|
|
|
|
#2 |
|
Junior Member
Join Date: May 2007
Posts: 14
|
bump?
|
|
|
|
|
|
#3 |
|
:
Join Date: Dec 2002
Posts: 2,557
|
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(); } |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: May 2007
Posts: 14
|
I think I'm confused by this part:
if (screen instanceof mx.screens.Slide) How do I modify that to work with the movie? edit: nevermind, I see what you're talking about... lemme try that. edit 2: YES it does work, I switched the code to look like this: 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.nextSlide.gotoAndPlay (1);
screen.rootSlide.currentSlide.gotoNextSlide();
}
// End GoTo Next Screen behavior
Last edited by gametavern; 07-25-2007 at 12:34 PM. |
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|