Creating a button:

You can see the creating a button tutorial here


In the first frame:

  1. Now you have your button in the frame 1.
  2. Draw a square or write a text using the text tool (T) to denote that it is the 1st frame.
  3. Click the button and insert the following code in the “Actions window” (Shortcut – F9)
on (release) {
gotoAndStop(10);
}

In the 10th frame:

  1. Click the 10th.
  2. Remove the identification and create a new identification, that it is a 10th frame.
  3. Remove the previously entered code for the button.
  4. and, Copy and paste the following code in the button.
on (release) {
 gotoAndStop(1);
}

Result:

Press Ctrl+Enter or choose “Test movie” from the control menu. Click the button. You will now enter into the 10th frame. Now again press the button. You will enter the 1st frame. That’s all !

Add your comment No Comments so far