7 Replies Latest reply on Jan 26, 2010 9:54 AM by Ned Murphy

    Play button fade to first frame

    Deaf Mike Level 1

      Please see the attached FLA I made in CS3.  All is ready except one thing

       

      - I am trying to figure out how when the play button in the lower right control button is clicked, it will fade from the current slide to slide

       

      #1 then begin the timeline playback.

      As an example when someone is viewing this and decides to click on the controller buttons in lower right - suppose you click on #2.  It stops on slide 2.  then you click play -  I want it to fade from #2 to #1 then play.  Same for the other 3 buttons.

       

      Any ideas?

        • 1. Re: Play button fade to first frame
          Ned Murphy Adobe Community Professional & MVP

          Your design isn't really geared to easily work the way you want due to using the timeline to tween from one object to another. Actionscript tweening would have been a better choice, though it's understandable if you haven't experience with a coded approach.  If I understand what you're wanting to do, then you'll need to add some new animation sections and some controls to go with things.

           

          Since you want the > (play) button to start the animation from the start with a fade out from wherever you are, you need to build in transitions for sections 2 thru 4 so that they each have a transition into the imagery of section 1.  So if you're in section 3 and the play button is clicked, you immediately go to the timeline section that has the tween from section 3 to 1.  And at the end of each of these section you command the timeline back to play from frame 1.

           

          Because of the possible jumping points, the play button has to be coded to go to the right closing animation.  So you should have a variable that keeps track of this that the play button uses, let's call it currentSectionClosure.  If you label your transition sections then that variable could be assigned the label for the section it is currently in when it first enters the section.  That way, your play button could use the same code for any section...  clicking it could trigger a line: gotoAndPlay(currentSectionClosure);

          • 2. Re: Play button fade to first frame
            Deaf Mike Level 1

            I see what you're saying. One part:

             

            ...you need to build in transitions for sections 2 thru 4 so that they each have a transition...

             

            I'm confused about because doesn't the timeline - when played - fade from 1 to 2 to 3 to 4 and back like it should?  Aren't those the transitions I need?  If I need to build more transitions, where will they go on the timeline?

             

            You are right though in what I want to happen when you click the > button.  Suppose the SWF is playing and you're on slide 2.  Then the user clicks the #3 button.  it will jump to slide #3 and stop.  Then you click > and it will fade from slide #3 to slide #1 and then start cycling through again 1-2-3-4 and back.

            • 3. Re: Play button fade to first frame
              Ned Murphy Adobe Community Professional & MVP

              slide 3 fades ito slide 4, not slide 1, so you need to create the transition from 3 to 1.  The extra transition will most likely be tagged onto the end of your timeline somewhere... best separated by blank keyframes.

               

              Just a bit of useability...  Usually a play button works in tag team fashion with by a pause button, and a play button plays from where you are, not from the start.  So users may be expecting something different than what you provide when they click the play button.

              • 4. Re: Play button fade to first frame
                Deaf Mike Level 1

                OK I have one more idea but am hoping you can help me with the AS to accomplish this...

                 

                Suppose the timeline is playing and it arrives in slide #2 then someone clicks the "3" and it jumps and stops on #3.

                 

                What kind of AS can I place on the > button so that wherever the timeline is paused at, and you click > it will start playing the timeline again at that pause point?

                • 5. Re: Play button fade to first frame
                  Ned Murphy Adobe Community Professional & MVP

                  I am assuming you know how to code the button.  The only command you would need in the function would be: play();

                  • 6. Re: Play button fade to first frame
                    Deaf Mike Level 1

                    I got it.  That was a dumb question last time.  I just made >button play and it works great.  thanks.

                    • 7. Re: Play button fade to first frame
                      Ned Murphy Adobe Community Professional & MVP

                      You're welcome