
Код AS1/AS2:
var faza = "1";
knopka.onRelease = function(){
switch (faza){
case "1": clip.onEnterFrame = function(){
clip._rotation+=5;
clip.updateAfterEvent();
if(clip._rotation >= 90) {delete clip.onEnterFrame;
faza = "2";
}
}
break;
case "2": clip.onEnterFrame = function(){
clip._rotation+=5;
clip.updateAfterEvent();
if(clip._rotation >= 180) {
delete clip.onEnterFrame;
faza = "3";
}
}
break;
case "3": clip.onEnterFrame = function(){
clip._rotation+=5;
clip.updateAfterEvent();
if(clip._rotation >= 270) {delete clip.onEnterFrame;
faza = "4";
}
}
break;
case "4": clip.onEnterFrame = function(){
clip._rotation+=5;
clip.updateAfterEvent();
if(clip._rotation >= 360) {delete clip.onEnterFrame;
faza = "1";
}
}
}
}