To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 07-24-2007, 01:24 PM   #1
gametavern
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

}
gametavern is offline   Reply With Quote
Old 07-25-2007, 10:50 AM   #2
gametavern
Junior Member
 
Join Date: May 2007
Posts: 14
bump?
gametavern is offline   Reply With Quote
Old 07-25-2007, 12:12 PM   #3
dawsonk
:
 
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();
}
dawsonk is offline   Reply With Quote
Old 07-25-2007, 12:19 PM   #4
gametavern
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
Thanks so much, now I have to figure out why my sounds don't stop when I click the button now.

Last edited by gametavern; 07-25-2007 at 12:34 PM.
gametavern is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash Newbies

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:57 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.