Flash Maths

Need an actionscripters help with flash math functions pow and sqrt!?

I need help with adding 2 functions in my flash calculator, raising x to the y power and finding the square root of x with actionscripting! I am not doing complicated coding just that in my frame i add :

set(x,”)
set(y,”)
set(total,”)

which means x and y are my two variables and total is the amount that comes from x and y when they are raised to the power, and in the sqare root case, it would be total = square root of x. like in the subtraction button i coded it like this:

on(press){ total=x-y }

so how do i integrate this to squaring integers and finding the square root of a number? Please dont say go to flashkit cause they have too much complicated coding and the official flash website doesn’t help too much. all i know is that to raise x to the y power i use the function pow and for square root i use
sqrt….

so please can u tell me how to do it in this format?

REMEMBER: I WILL PICK BEST ANSWER IF I GET WHAT I AM LOOKING FOR!!!!

Power:
on(press){ total = Math.pow(x,y); }

Sqrt:
on(press){ total = Math.sqrt(x); }

Speed Math Program in Flash


Multiplication & Division Placemat


Multiplication & Division Placemat


$4.00


The Skills mats help children begin to problem solve, focusing on math, writing, and other practical skills. From counting to fractions to handwriting practice, children will learn through engaging pictorials and practice to reinforce their new abilities….

Flesh And Bones Electric Fun


Flesh And Bones Electric Fun


$6.28


Recorded live at the Henry Ford Theatre in Los Angeles, this star-making concert from electro-rock sensations MuteMath showcases the group’s innovative sound. Armed with catchy melodies, electronic beats and introspective lyrics, the New Orleans-based indie combo will win you over with performances of “Collapse,” “Typical,” “Stare at the Sun,” “Control,” and more. Soundtrack: English; behind-the-s…

Flesh And Bones Electric Fun (DMD Album)


Flesh And Bones Electric Fun (DMD Album)


$9.99



Leave a Reply