Main Menu?

Started by: X-Core | Replies: 1 | Views: 438

X-Core
2

Posts: 56
Joined: Mar 2014
Rep: 10

View Profile
Mar 25, 2014 11:45 PM #1179961
I am going to compete in GTL, I was just wondering. How do I make commands that makes something turn into a button that can send you to a frame (facts from the main menu) that isn't even part of the animation? How do you put something to an animation without it being shown unless a specific button from the menu of the animation has been pressed? Also, how do you make a scene selection feature in the project?
Zed
2

Posts: 11,572
Joined: Feb 2009
Rep: 10

View Profile
Mar 26, 2014 2:21 PM #1180328
To make something into a button, select whatever you want to be a button and press F8. Then make sure "button" is selected before continuing.

To make that button take you to a specific frame of animation, select the button and press F9. The code you want is
on(release){
_root.gotoAndPlay (#)
}


To make sure that part of the animation isn't seen until you want it to be, go to the frame before it and, with nothing selected, press F9 and use the code "stop()". Or add the code
onClipEvent(enterFrame){
gotoAndPlay (#)
}

which will direct the animation off somewhere else.

If you're making a menu, you'll want a stop() code on that frame too.


Here are some tutorials on buttons.
http://forums.stickpage.com/showthread.php?279-Flash-The-Scarecrow-s-Button-Tutorial-(revised)
http://forums.stickpage.com/showthread.php?98-interactivity-for-idiots

All the code is AS2, which is the same as the preloader stone listed in the competition page so it should be what you're using.