Menu that Swings In - Step Eight: ActionScript for the Movie Clips
Posted by : PhilS on Jul 31, 2008
The ActionScript below makes sure that the Movie Clips follow the lead of Movie Clip 1.
1.
Lock the: Actions Layer
2.
Unlock the: Buttons Layer
3. Open the Actions Panel: Window - Actions (Ctrl F7)
4. Switch Script Assist off. Go to the Actions Panel Side Menu Button: 
Script Assist is off when there is: No Tick
5. Select Movie Clip 2
Tip: In the top left of the Actions Panel you must be able to read:
6. Attach the following to Movie Clip 2:
onClipEvent (enterFrame) {
_x = _root.MC**1**._x; // button 2 refers back to button 1
}
7. Select Movie Clip 3 and attach the code:
onClipEvent (enterFrame) {
_x = _root.MC**2**._x
}
8. Select Movie Clip 4 and attach the code:
onClipEvent (enterFrame) {
_x = _root.MC**3**._x
}
9. Select Movie Clip 5 and attach the code:
onClipEvent (enterFrame) {
_x = _root.MC**4**._x
}
10. Select Movie Clip 6 and attach the code:
onClipEvent (enterFrame) {
_x = _root.MC**5**._x
}
Note: The code for MC 2 refers back to MC 1, The code for MC 3 refers back to MC 2, The code for MC 4 refers back to MC 3, etc.
11. Test Your Movie: Control - Test Movie (Ctrl + Enter)
12. Place the Mouse over the: Menu bar

All the Buttons works.
13. Close the Test Window:

no comment
Add comment