Algebra

I was wondering if you could help me with something. I am going to create something in flash. I haven’t done actionscript in a while but I do understand the basics. I can do the simpler stuff but I am having trouble working out how I would go about doing this. I am trying to create a ‘calculator’ that would allowd me to complete this algorithm. or would at least allow me to create a calculator to calculate an algebraic equation.

*= squared in my example ok

V = P* x 0.04 x S

So essentially P* x 0.04 x S = V

P* and S are known numbers but are variable and I would need to be able to type and change these to equal V.

There are a few other things that I need but I know how to do those, or I’m sure I can source them as they are simple. How would I go about doing this in actionscript? Any help or suggestions you could offer would be greatly appreciated.