Making a play button.

Started by: Work in Progress | Replies: 4 | Views: 382

Work in Progress
2

Posts: 169
Joined: Mar 2013
Rep: 10

View Profile
Jun 16, 2013 11:13 AM #1008987
I think I do everything correctly. I make a play button, I paste the code into actions, and make a little anim to see how it goes, and I keep getting a weird actionscript error, and all the play button does is blink and then move on to the anim.
Lethal
2

Posts: 1,163
Joined: May 2013
Rep: 10

View Profile
Jun 16, 2013 11:32 AM #1008996
Step 1
Make a play button.

Step 2
Click the play button you created by using Transformation Tool.

Step 3
Right click the button you did.

Step 4
Right click > Convert to Symbol > Button then click OK button.

Step 5
Now click the frame where your button is placed (example: frame 1 or frame 2).

Step 6
Now after you click the frame where your button is placed, go to Actions (can be found at the bottom of Flash 8) then type the code:

stop();

Step 7
Now after that, click your button again then go to actions then insert the following code:

on(release){
gotoAndPlay(2)
}

Then after that. you're done. Hold CTRL then click ENTER to test your animation.
Arch-Angel
2

Posts: 9,496
Joined: Jan 2007
Rep: 10

View Profile
Jun 16, 2013 11:36 AM #1009004
Or if you don't want to be a loser, make two layers, an on the top later have your text and on the bottom layer make a transparent box around the text before you make it a button.
Work in Progress
2

Posts: 169
Joined: Mar 2013
Rep: 10

View Profile
Jun 16, 2013 12:24 PM #1009027
Quote from Lethal5
Step 1
Make a play button.

Step 2
Click the play button you created by using Transformation Tool.

Step 3
Right click the button you did.

Step 4
Right click > Convert to Symbol > Button then click OK button.

Step 5
Now click the frame where your button is placed (example: frame 1 or frame 2).

Step 6
Now after you click the frame where your button is placed, go to Actions (can be found at the bottom of Flash 8) then type the code:

stop();

Step 7
Now after that, click your button again then go to actions then insert the following code:

on(release){
gotoAndPlay(2)
}

Then after that. you're done. Hold CTRL then click ENTER to test your animation.


Thank you Lethal! The only trouble I really have now is when I'm trying to hover my mouse over the text..yeah I can't click the text itself, just around it to play.
Lethal
2

Posts: 1,163
Joined: May 2013
Rep: 10

View Profile
Jun 17, 2013 11:06 AM #1009997
I forgot to tell this for you, the number " (2) " at the step 7 code means when you click the button, it will put you to frame 2 and now will start the animation. Just replace it with the frame number at where your animation will start. Example:

Your animation starts at frame 5. Replace the (2) as (5). So if you click the button, it will directly start the animation at frame 5 and your animation will start

Goddamn I'm really bad at explaining. Sorry for being bad at explaining/talking in English. I'm asian lol.