Download Calculate.fla
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);
DivideButton_btn.addEventListener(MouseEvent.CLICK, doMyCalculation); { var total : Number;
// PROCESS total = Number(N1.text)/Number(N2.text);
PlusButton_btn.addEventListener(MouseEvent.CLICK, doMyCalculation); { var total : Number;
// PROCESS total = Number(N1.text)+Number(N2.text);
// OUTPUT total.text = String(myAnswer); }
Thanks guys
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.
why'd you copy and paste the code again? It looks like it should just be MultiplyButton_btn.addEventListener(MouseEvent.CLICK, doMyCalculation); DivideButton_btn.addEventListener(MouseEvent.CLICK, doMyCalculation);
etc? That's my closest guess. the documentation seems to show that function being used that way.
i'm just an amateur at coding though
good for u...can you make a graphing one like the TI80s series