Next animation button

A place for tutorials on how to get the most out of Flash

Next animation button

Postby grizzly » Tue Jan 04, 2011 9:00 pm

Hi!

I'm just started in flash. Now I know how to make animations and stuff, but I dont know how to make a button to go to the next animation/scene...

I know it has to be easy if you know actionscript... So that's the problem... I dont know how to script :P
Remember I'm very new to flash, so it would be great if somebody could tell me how in a simple way :D
grizzly
Newly Registered
 
Joined: Tue Jan 04, 2011 8:54 pm

Re: Next animation button

Postby KaTsuO_O » Tue Jan 04, 2011 11:42 pm

If you work in Actionscrip 2.0 this is how it would work:

1. Make something that you want to be your button
2. Highlight it and press F8 or you can right-click it and press "convert to symbol"
3. Change the type to button
4. Name it if you want and press OK
5. Click on it and press F9
6. Put some codes in it

on (release) {
_root.gotoAndPlay(2);
}

This peice of code makes your movie to jump to frame 2. The number between () is the number of frame of your movie.

gotoAndPlay tells the movie to go to that frame and play it, but you can also wright gotoAndStop which makes your movie to go to that frame and then stop.

on (release) {

this line tells when you have released the button the following code will be active but you can also wright press instead of release or also rollover is usefull.

_root.

means the root of something, in this case the movie.
Don't create a porn game if you're only interested in porn.
Wise words regarding criticism http://www.youtube.com/watch?v=-98ZFl1sKt4
User avatar
KaTsuO_O
 
Joined: Tue Nov 02, 2010 6:03 pm


Return to Tutorials



Who is online

Users browsing this forum: No registered users