|
Until you sign up you can't do much. Yes, it's free.
|
|
|
|
|
|
|
 | / / / Viewing Topic
|  |
( Randomaster )
Soothsayer
Patron
|
I'm making a calculator in Flash CS3 using actionscript 3.0. It has the Multiply, Divide, Plus & Minus buttons. When i input the code for one button, that button works, but when i input the code for more than one, none of the buttons work. What am I doing wrong? Download Calculate.fla | Code: | | MinusButton_btn.addEventListener(MouseEvent.CLICK, doMyCalculation); function doMyCalculation(e:MouseEvent):void { var total : Number; // PROCESS total = Number(N1.text)-Number(N2.text); // OUTPUT total.text = String(myAnswer); }; MultiplyButton_btn.addEventListener(MouseEvent.CLICK, doMyCalculation); { var total : Number; // PROCESS total = Number(N1.text)*Number(N2.text); // OUTPUT total.text = String(myAnswer); }; DivideButton_btn.addEventListener(MouseEvent.CLICK, doMyCalculation); { var total : Number; // PROCESS total = Number(N1.text)/Number(N2.text); // OUTPUT total.text = String(myAnswer); }; PlusButton_btn.addEventListener(MouseEvent.CLICK, doMyCalculation); { var total : Number; // PROCESS total = Number(N1.text)+Number(N2.text); // OUTPUT total.text = String(myAnswer); } | Thanks guys
------- How's that workin' for ya? Myspace Š ╬ Ģ
|
|
|
|
|
 LiveWire Humor
|
|
|
Post from this position was omitted due to content violations
|
|
Post from this position was omitted due to content violations
|
|
Post from this position was omitted due to content violations
|
|
Post from this position was omitted due to content violations
|
( Randomaster )
Soothsayer
Patron
|
Quote: from oridniv at 3:44 pm on Jan. 6, 2009
good for u...can you make a graphing one like the TI80s series
thanks for the help
------- How's that workin' for ya? Myspace Š ╬ Ģ
|
|
|
|
Post from this position was omitted due to content violations
|
|
|
4est
Oh, Mr. Darcy!
Patron
Tech Support Leader
|
Are you sure that '*' is an acceptable character for use in flash? I'm no programming expert, but I know flash is very picky about things like that.
------- In vain I have struggled. It will not do. My feelings will not be repressed. You must allow me to tell you how ardently I admire and love you.
|
9:45 pm on Jan. 5, 2009 | Joined: July 2005 | Days Active: 981 Join to learn more about 4est South Africa | Label Free | Posts: 23,096 | Points: 36,188
|
|
| |
|
|
|
|
|
|
|
| Looking for something else?
|
|
|
|
|
|
 | / / / Viewing Topic |  |
|