Forum Moderators: open

Message Too Old, No Replies

Rewinding an animation within a presentation

Action script seems right, behavior seems wrong

         

babblefu

8:26 pm on Jun 3, 2005 (gmt 0)

10+ Year Member



I'm using MX2004 to make a presentation for an astronomical center. Effectively a FLASH website but not intended for internet delivery (it will live on a keyosk in the center). Anyway, there is this page that explains the deal with why Earth and Mars only get close every 2 years with an animation that illustrates both orbits. The animation begins when the section frame is hit and I wanted to add a "replay" button.
I put a pause on the opening section frame so it does not progress till the animation is done. Then I made a "replay" button appear on the frame where the whole thing has stopped. That button sends the user back to the sections opening frame. Seemed to make sense, and the scripting does that but the animation does not restart. I guess returning to the frame that introduced the animation is not enough. No doubt there is a better way, I open to suggestions! Just a push in the right direction would help.

Richard_N

10:57 pm on Jun 3, 2005 (gmt 0)



you need to go to the first frame of the actual animation ie if frame 1 has a stop action then actionscript on the final frame should read.

//stop the movie
stop();
//code to control the button instance rewind_btn
rewind_btn.onPress = function() {
gotoandPlay(2);
}

this assumes the rewind button is not on the stage till the final frame.

If you already knew this apologies :-)

babblefu

1:53 pm on Jun 6, 2005 (gmt 0)

10+ Year Member



How cool it is to come in Monday morning and have a fix waiting for you? Thanks Richard, no apologies needed! Steve