смотрим класс Math
Цитата:
Math class
Availability
Flash Player 5. In Flash Player 4, the methods and properties of the Math class are emulated using approximations and may not be as accurate as the non-emulated math functions supported by Flash Player 5.
|
Цитата:
Math.sqrt()
Computes a square root.
|
a^2=a*a !!
a^3=a*a *a!!

Код:
a=4;
b=1;
stepen=4;
for (i=0;i<stepen;i++){
b*=a;
}
trace(b);

Код:
function stepen(a:Number,c:Number):Void{
var b:Number=1;
for (i=0;i<c;i++){
b*=a;
}
trace(b);
}
stepen(2,4);