Hi, I need to convert this code to ActionScript 2 or ActionScript 3. I prefer ActionScript 2.
Code:
onClipEvent (mouseDown) {
if (i>0) {
return;
}
zoom = true;
dir == 1 ? (dir=-1) : (dir=1);
if (dir == 1) {
pt = {x:_root.zoom_this._xmouse, y:_root.zoom_this._ymouse};
}
}
onClipEvent (enterFrame) {
if (!zoom) {
return;
}
_root.zoom_this._xscale += dir*i*100/8;
_root.zoom_this._yscale += dir*i*100/8;
var pt2 = {x:pt.x, y:pt.y};
_root.zoom_this.localToGlobal(pt2);
_root.zoom_this._x -= (pt2.x-pt.x);
_root.zoom_this._y -= (pt2.y-pt.y);
i++;
if (i == 10) {
zoom = false;
i = 0;
}
}
Thanks in advance!