4 Replies Latest reply on May 27, 2009 7:33 AM by Mikachi

    How do I start/stop a slide's animation?

    Mikachi

      One slide of a slideshow I'm making I want the animation to end after it's completed without looping.  I can do this by adding the stop(); command into the last frame of that slide, but if I return to that slide, it will remain in the end position instead of replaying.  Is there anything I can do about this?

        • 1. Re: How do I start/stop a slide's animation?
          Ned Murphy Adobe Community Professional & MVP

          How is the slideshow put together, and how does it plays out?  Is there anything that currently tells the slide to start playing when it shows up, or is it currently playing the whole time it's in the show?

          • 2. Re: How do I start/stop a slide's animation?
            Mikachi Level 1

            For the slideshow, each slide is a different screen under the Presentation thing.  To play through it, I have clickable arrows in the left and right lower corners, or you can alternatively use the arrow keys.  I don't have anything special telling the slide when to play, it just starts when it's reached in the show.  Forgive me if it's confusing, I've only just started learning the program last week. ^_^;

            • 3. Re: How do I start/stop a slide's animation?
              Ned Murphy Adobe Community Professional & MVP

              Describe "a different screen under the Presentation thing" with as much detail as you can.  What do the buttons do related to the Presentation thing?  What code is assigned to them?

              • 4. Re: How do I start/stop a slide's animation?
                Mikachi Level 1

                When I start up Flash, there's a box immediately to the left of the workspace.  It doesn't actually have a title, but has a + and - at the top.  Inside the box, there's a thumbnail with the word "presentaion" next to it.  I right click on that, hit "Insert Screen", and a box appears under it branched out with the basic name of 'slide#'.  These slides are what I'm making my slideshow across.

                 

                The buttons in my slideshow advance to the next slide, seemingly the exact same function as the left/right arrow keys.  I didn't actually code it myself since I don't understand Actionscript too well yet, I used the Behaviors window and selected Screen > 'Go to Next Slide' (or Prev Slide).  The code that it generated for the Next Slide Button is:




                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
                   
                }