Everything Buttons [Flash][Actionscript]

Started by: Paperclip | Replies: 44 | Views: 21,804

bobbly bob9

Posts: 0
Joined: Nov 2025
Mar 25, 2006 1:02 PM #6511
im making a game and i dont know how to make the instructions button without creating a new scene or messing it up. Also im not sure how to make the game...lol
noobsarenew2

Posts: 0
Joined: Nov 2025
May 7, 2006 4:26 AM #9410
hi!!!!!!!!!!!!!!!!!!!!!!
noobsarenew2

Posts: 0
Joined: Nov 2025
May 7, 2006 4:27 AM #9411
on (release){ gotoAndPlay(a number); }




on (release){ _root.instancename.gotoAndPlay(a number); }




on (release){ gotoAndPlay("Scene 1", 1); }


on (release){ totalMoney += 5; }



totalMoney = 5



on (release){ totalMoney -= 5; }



on (release){ totalMoney *= 5; }



on (release){ totalMoney /= 5; }



on (release) { geturl("http://www.awebsite.com"); }
MARCOPOLO

Posts: 0
Joined: Nov 2025
May 8, 2006 8:43 PM #9508
nice tut. dont doublepost, noobsarenew2. and thanx for getting my sig out of your's. ask next time.
SoMe GuY

Posts: 0
Joined: Nov 2025
May 26, 2006 5:04 PM #10337
how do i put in the commands and where?
isharkpod

Posts: 0
Joined: Nov 2025
Jun 18, 2006 10:51 AM #11481
for example i made one little movie with a grenade exploding and it has two layers and its about 60 frames long.When i try to make that into a symbol or movieclip i cant choose convert to symbol.How do you do it so that the grenade movie becomes a movieclip then a button into my other movie?
Sorry i know that this is kinda confusing.
Paperclip

Posts: 840
Joined: Nov 2004
Rep: 500

View Profile
Jun 18, 2006 6:40 PM #11525
Okay, start off by making a blank movieclip... meaning get the brush tool and clicking once on the stage to create a dot. Then convert that dot to a movieclip and then delete the dot in the edit mode. Get out of edit mode and there will be nothing there. Delete the movieclip off the stage and highlight all the frames you want in the movieclip. Once all your frames are selected right click and hit copy frames. Double click on the empty movieclip in the library to bring up the edit mode and then right click on the empty keyframe and select paste frames. Exit edit menu and you will have your animation in a movieclip.

Now that you have your movieclip you will need to add the button function. Bring up teh edit mode for the movieclip again. Type in the following action, "stop();" on the first frame of the animation. This will prevent the movieclip from playing the animation. Now, the button function can be done two ways:

1. You can make a box around the whole movieclip and convert it to a button. Then turn the alpha down to 0% to make it invisible. Then add these actions to the button:
 on(release){
_root.thenameofyourmovieclipinstance.gotoAndPlay(2);
}

2. Drag the movieclip onto the stage and selected it so that it is highlighted. Then bring up the actions panel. Add this code to it:
 on(release){
gotoAndPlay(2);
}

The code that is used on a button will work on a movieclip. So it is very useful. I hope this helps. Good luck on making whatever you are trying to make. If something is unclear ask another question.
slipup

Posts: 11
Joined: Sep 2006
Rep: 10

View Profile
Sep 19, 2006 8:52 PM #15595
thanks soooo much ive made like 10 videos and finaly i can add a play button
cprulz

Posts: 0
Joined: Nov 2025
Jul 6, 2007 6:14 AM #43256
HELP!! i wanted to make a button for an advertisement, like paperclips sig when you request for a new name, you just have to click on that part of the sig.
Lixu

Posts: 3,859
Joined: Aug 2007
Rep: 10

View Profile
Aug 10, 2007 12:01 PM #50461
Thank you for your tutorial. It helped.
wardog

Posts: 0
Joined: Nov 2025
Aug 10, 2007 4:00 PM #50468
i still don't get how to make the buttons do things when you place you arrow over them im not much on actionscriping
blueguy910
2

Posts: 11
Joined: Mar 2007
Rep: 10

View Profile
Oct 23, 2007 3:34 AM #64757
god dammit just tell me a simple way to do it.just straight to the point
Etch

Posts: 1,239
Joined: Oct 2007
Rep: 10

View Profile
Nov 16, 2007 1:12 AM #68070
sorry for the bump, oh and btw, i have made a button, but for the code, do i need a new layer or just add another frame and start animating,im so confused,
i used this code

on(release){
gotoAndPlay(2);
}

please, somebody explain
Paperclip

Posts: 840
Joined: Nov 2004
Rep: 500

View Profile
Nov 17, 2007 5:53 AM #68117
1. Select the button you have made
2. Pull up the actions window
3. Paste the code in the window
4. Exit the actions window
5. Make sure you have a second frame on the timeline
6. Animate as usual, your button will start playing your animation starting from frame 2.
Squelch
2

Posts: 71
Joined: Mar 2007
Rep: 10

View Profile
Feb 11, 2008 2:08 AM #82965
Sorry for the big bump but, what if I have already animated my movie and I want to add a button to play it. I make an empty frame in the beginning and I put the button in the frame. I AS the button with
(release){
gotoAndPlay(2);
}
and when I press ctrl+enter, it just plays the movie like normal. So, whats up? How come my button isn't working?