Skip Navigation.

Flash: Restart Button

As a component to most Flash movies, you'll probably want a restart button so that the user can click it instead of needing to reload the Flash file. Adding a restart button is easy. First, add a "stop" action to the final frame of your Flash file. This will keep the movie from automatically looping. Then, create a button and place the button on that last frame. On the button, you'll put the code to restart the movie, which is:

on (release) { gotoAndPlay(1);
            }

This code is used in context with a short actionscript on the crystal bar example.

Back