Be a Supporter!

Button in CS3?

  • 285 Views
  • 4 Replies
New Topic Respond to this Topic
Jigganis
Jigganis
  • Member since: Nov. 7, 2003
  • Offline.
Forum Stats
Member
Level 12
Blank Slate
Button in CS3? 2008-11-14 03:02:59 Reply

Am lost. Can help?

MrCaravaggio
MrCaravaggio
  • Member since: Jun. 16, 2005
  • Offline.
Forum Stats
Member
Level 16
Blank Slate
Response to Button in CS3? 2008-11-14 03:05:34 Reply

Are you trying to make a button to do something or are you confused about how the button option in convert to symbol differs from movieclips?

Poopsmith890
Poopsmith890
  • Member since: Sep. 27, 2006
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
Response to Button in CS3? 2008-11-14 05:02:47 Reply

Your using CS3? Then tell me, what actionscript are you using? If your using actionscript 3, then thats why, AC3 is really complex. And is used for other shizzle, the NG Audio Player is AC3, but to make games and shit, do AC2, otherwise it'll just say you cant apply actions, so if your using AC3, there you go.

(The preceeding comment was written assuming that you've made a button before on other flash versions, and that you have no problem with writing the scripture down)


"Anybody in this room of wankers got enough pride to talk to me?"
Signiture by xHeavyMetalx :D

BBS Signature
MintPaw
MintPaw
  • Member since: Jun. 11, 2006
  • Offline.
Forum Stats
Member
Level 10
Programmer
Response to Button in CS3? 2008-11-14 08:35:49 Reply

well there's as2 witch is pretty easy:

1. draw out your button
2. right click on it and press convert to symbol(F8) make it either a movieclip or a button
3. right click it and press action(F9)
4. put the following on it

// the following means 'when the player clicks on the button and releases his/her mouse from it'
on(Release){
//put what you want to do when you click the button here
}

then there as3

1. draw out your button
2. right click on it and press convert to symbol(F8) make it either a movieclip or a button
3. find you 'properties' menu, it's most likely at the bottom of your screen
4. click you button and look on the properties menu to find the 'incentive name' change it to whatever you wish
5. click on the FRAME and right click>action(f9) WITH THE FRAME HIGHLIGHTED
6. put the following code on the frame

// makes it so when you click the button it runs the function 'myFunction'
// change myButton to the name you gave your button
// change myFunction to then name you will give your function later
myButton.addEventListener(MouseEvent.CLICK,myFunction)

//make the function called 'myFunction' (feel free to change)
// makes it a 'MouseEvent' type function
function myFunction (type:MouseEvent){
//what you want the button to do here
}

now excuse me while i go soak my fingers in ice water


If ya have something to say, PM me. I have a lot of time to spare.
Also never PM egg82.

BBS Signature
eazyjoe
eazyjoe
  • Member since: Oct. 18, 2008
  • Offline.
Forum Stats
Member
Level 10
Blank Slate
Response to Button in CS3? 2008-11-14 10:15:54 Reply

CS3 BUTTON!
1 stop();
2
3 buttonInstanceHere.addEventListener(Mous eEvent.CLICK, functionNameHere);
4
5
6 function functionNameHere(myEvent:MouseEvent):voi d//returning no value.
7 {
8
9 gotoAndPlay("frame number you want it to go to");
10 }

oh and buttonInstanceHere is the instance you gave your button in the lower left of the properties box!
hope this helps!


BBS Signature