Translate AS2 code to AS3
sliceArray=["slice1","slice2","slice3","slice4","slice5","slice6","slice7",
"slice8","slice9","slice10"];
function rotateMC(num:Number)
{
for (i=0;i<= sliceArray.length;i++)
{
var myName=eval(sliceArray);
myName._rotation+=num;
}
}
btn1.onPress=function(){
this.onEnterFrame=function(){
rotateMC(10);
}
}
btn1.onRelease=function(){
delete this.onEnterFrame;
}
btn2.onPress=function(){
this.onEnterFrame=function(){
rotateMC(-10);
}
}
btn2.onRelease=function(){
delete this.onEnterFrame;
}