Код AS1/AS2:
onClipEvent(load){
x = 0;
}
onClipEvent(enterFrame){
trace(this._rotation);
if(x == 0){
this._rotation += 1 + Math.random()*10;
if(this._rotation > Math.random()*70){
trace(x);
x = 1;
}
}
if(x == 1){
this._rotation -= 1 + Math.random()*10;
if(this._rotation < -Math.random()*70){
trace(x);
x = 0;
}
}
}