|
Until you sign up you can't do much. Yes, it's free.
|
|
|
|
|
|
|
 | / / / Viewing Topic
|  |
( Randomaster )
Connoisseur
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 goin' for ya? http://myspace.com/luke_web
|
|
|
|
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 )
Connoisseur
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 goin' for ya? http://myspace.com/luke_web
|
|
|
|
Post from this position was omitted due to content violations
|
|
|
4est
Rockin' the Suburbs
Patron
|
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.
------- Ask me no questions, I'll tell you no lies.
|
9:45 pm on Jan. 5, 2009 | Joined: July 2005 | Days Active: 906 Join to learn more about 4est British Columbia, Canada | Metrosexual Male | Posts: 18,406 | Points: 30,910
|
|
| |
|
|
|
|
|
|
|
| Looking for something else?
|
|
|
|
|
|
 | / / / Viewing Topic |  |
|