Step-1: Create 4 input boxes (text) and give the names to them as n, n1,
n2, r1
Step-2: Create 7 buttons with the text on them as round, ceil, log
square root, min, max.
Step-3: Select the button (round) and open the script and write the
following code
on (release)
{
r1.text=Math.round(Number(n1.text));
}
Step-4: Select the button (ceil) and open the script and write the
following code
on (release)
{
r1.text=Math.ceil(Number(n1.text));
}
Step-5: Select the button (floor) and open the script and write the
following code
on (release)
{
r1.text=Math.floor(Number(n1.text));
}
Step-6: Select the button (log) and open the script and write the
following code
on (release)
{
r1.text=Math.log(Number(n1.text));
}
Step-7: Select the button (square root) and open the script and write the
following code
on (release)
{
r1.text=Math.sqrt(Number(n1.text));
}
Step-8: Select the button (min) and open the script pane and write the following code
on (release)
{
r1.text=Math.min(Number(s1.text),Number(s2.text));
}
Step-9: Select the button (max) and open the script pane and write the following code
on (release)
{
r1.text=Math.max(Number(s1.text),Number(s2.text));
}
Step-10: press ctrl+enter to test the movie give appropriate input and click the button (any) to perform mathematic operation the result will be printed on the r1 field