copy(objectbackup.%1,%1);
set(%1,%2);
copy(%1,objectbackup.%1);
if(rows GT 1,
div(cols, get(image.frames), rows);,
set(rows,1);
set(cols, get(image.frames)););
%1(idletime, 2.0);
%1(view.fovtype, HFOV);
%1(view.limitview, fullrange);
%1(view.maxpixelzoom, 1.0);
%1(control.zoomtocursor, true);
%1(control.zoomoutcursor, true);
%1(control.mousetype, drag2D);
%1(control.mousespeed, mousespeed);
%1(display.stillquality, HIGHSHARP);
if(control.mousespeed == 0,
set(mbdown, true);
set(lastframexpos,null);
set(lastframeypos,null);
objectrotate();
);
set(mbdown, false);
div(mxpos, mouse.x, stagewidth);
mul(framexpos, mxpos, image.frames);
roundval(framexpos);
if(lastframexpos == null, copy(lastframexpos,framexpos));
sub(framexmove, lastframexpos, framexpos);
copy(lastframexpos,framexpos);
set(rotatexdirection, right);
if(framexmove LT 0,
mul(framexmove,framexmove,-1);
set(rotatexdirection, left); );
div(mypos, mouse.y, stagewidth);
mul(frameypos, mypos, image.frames);
roundval(frameypos);
if(lastframeypos == null, copy(lastframeypos,frameypos));
sub(frameymove, lastframeypos, frameypos);
copy(lastframeypos,frameypos);
set(rotateydirection, up);
if(frameymove LT 0,
mul(frameymove,frameymove,-1);
set(rotateydirection, down); );
if(mbdown,
if(framexmove != 0,
set(i, get(image.frame));
sub(i, 1);
mod(i, cols);
add(i, 1);
if(rotatexdirection == left,
if(i == 1,
add(image.frame, cols););
sub(image.frame,1);,
if(i == cols,
sub(image.frame, cols););
add(image.frame,1);););
if(frameymove != 0,
if(rotateydirection == up,
sub(i, get(image.frames), cols);
add(i, 1);
if (image.frame LT i,
add(image.frame, cols););,
if(image.frame GT cols,
sub(image.frame, cols););
);
);
delayedcall(0.01,objectrotate());
);
if(rows GT 1,
tween(plugin[%1].alpha,0.7);
);
tween(plugin[rotaterightbg].alpha, 0.7, 1.5, easeOutQuad, tween(plugin[rotaterightbg].alpha, 0.0, 2.5, easeInExpo));
tween(plugin[rotateleftbg].alpha, 0.7, 1.5, easeOutQuad, tween(plugin[rotateleftbg].alpha, 0.0, 2.5, easeInExpo));
if(rows GT 1,
tween(plugin[rotateupbg].alpha, 0.7, 1.5, easeOutQuad, tween(plugin[rotateupbg].alpha, 0.0, 2.5, easeInExpo));
tween(plugin[rotatedownbg].alpha, 0.7, 1.5, easeOutQuad, tween(plugin[rotatedownbg].alpha, 0.0, 2.5, easeInExpo));
);
set(rotateing,true);
rotateleft();
set(rotateing,true);
rotateright();
set(rotateing,true);
rotateup();
set(rotateing,true);
rotatedown();
set(i, get(image.frame));
sub(i, 1);
mod(i, cols);
if(i == 0,
add(image.frame, cols););
sub(image.frame,1);
delayedcall(0.2 , if(rotateing,rotateleft()) );
set(i, get(image.frame));
sub(i, 1);
mod(i, cols);
add(i, 1);
if(i == cols,
sub(image.frame, cols););
add(image.frame,1);
delayedcall(0.2 , if(rotateing,rotateright()) );
sub(i, get(image.frames), cols);
add(i, 1);
if (image.frame LT i,
add(image.frame, cols););
if(image.frame GT cols,
sub(image.frame, cols););
set(rotateing,false);