Sorry button got clicked!! Stoopid computer...let me try that script again...
private function CostCal():void{ var a:int = Number(form1.text.replace(/,/g,'')); var b:int = Number(form2.text.replace(/,/g,'')); var c:int = Number(form3.text.replace(/,/g,'')); //Calculation var i:int = Number(a*(b+c)); var h:int = Number(365); var g:int = Number(i/h); form4.text = NumberFormatter.format(g); } So what this is basically doing is adding the fields then displaying in another field. I have used int/number just to make sure its a numeric value. It doesn't make a difference if I change that. Also I got it so it adds but when I try to divide or anything else it freaks! i.e. no calculation. IS there anywhere that someone can point me to doing calculations in actionscript...cause what I have found on the internet is limited. I might have to bail on flex and go back to javascript and HTML... Any advise would be good. Thanks. Jeremy On Mar 13, 9:42 am, "<cfgroupie>" <[EMAIL PROTECTED]> wrote: > Hi guys, > > I don't have access from work to Yahoo Groups but I do have access to > cfaussie. go figure. > Never the less I'm struggling with Flex and all its pain. So if anyone > out there knows flex and this question I would be much appreciated. > > I'm trying to do a simple calculation. So when you put a value in one > field it will calculate in another...and so on. Below is the > actionscript. > > private function CostCalc():void{ > > > > }- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---