by Bnuts40
1. Open Flash 4 and create a new Flash Movie Project. See Flash Overview.
2. Create and insert a button into Layer 1, Frame 1 of the movie. See Creating a Button. (This frame must be a Keyframe. Layer 1, Frame 1 is a Keyframe by default).
Note: In this example we will assign an action to the button in Layer 1, Frame 1 to go to a yellow square drawn in Layer 2, Frame 5.
Assign an action to the button as follows (see Figures 1 and 2):
3. Select the button in Layer 1 with the "Pick (Arrow) Tool"
4. Select "Modify > Instance" from the menu at top of work area. (The Instance Properties dialog box should appear).
Note: When an object is selected with the Pick Tool and "Modify > Instance" is selected, only the properties of the selected object will be modified. This allows multiple actions to be assigned to different objects within a frame.
5. Select the "Actions Tab" from the Instance Properties dialog box.
6. Select the "Actions Menu (+)" button. (The minus (-) button will remove actions if desired).
7. From the Actions Menu", select "On Mouse Event" then select "Press" (Figure 1).
8. Select the "Actions Menu button again.
9. From the Actions Menu", select "Go To" (Figure 2).
10. Ensure "Scene" is set to "current scene" and type "5" into the "Frame" box.
11. Now select the "Go to and Play" box.
12. Click "OK".
Figure 1
Figure 2
Create the scene that the button will link to as follows (see Figure 3):
13. Insert a new layer into the movie as follows:
14. Right Click the "Layer 1" bar.
15. Select "Insert Layer" from the dialog box. (You should now have Layer 2).
16. Select Layer 2, Frame 5 and insert a Keyframe (F6)
17. Using the Rectangle tool, draw a yellow rectangle in the new Keyframe.
Figure 3
18. Now double click Layer 2, Frame 5. (The Frame Properties dialog box will appear).
19. Select the "Actions Tab", then "Actions Menu". Now select "Stop". (This will stop the movie at Frame 1 until the button is selected).
Congratulations - You have just assigned actions to a button.
20. Export the movie to an .swf file as desired. See Flash Overview.