Hi I want to convert the below code to AS2 currently it is AS3
// Set variables for numbers we need in our equationsvar activatorWidth:int = activator.width;
var activatorHeight:int = activator.height;
var boundX:int = bigPic.x + activator.x * 2;
var boundY:int = bigPic.y + activator.y * 2;
var diffX:int = bigPic.width - activatorWidth;
var diffY:int = bigPic.height - activatorHeight;
var easeSpeed:int = 7;
// Function that activates the movement (MOUSE_OVER activator)
function activate(event:Event):void {
var divX:Number = mouseX / activatorWidth;
var divY:Number = mouseY / activatorHeight;
var moveX:Number = divX * diffX;
var moveY:Number = divY * diffY;
bigPic.x += (boundX - moveX - bigPic.x) / easeSpeed;
bigPic.y += (boundY - moveY - bigPic.y) / easeSpeed;
}
// Listeners on the activator to Add / Remove Enter Frame Events
activator.addEventListener(MouseEvent.MOUSE_OVER, addEnterFrameEvent);
activator.addEventListener(MouseEvent.MOUSE_OUT, removeEnterFrameEvent);
// Add Enter Frame Event Function
function addEnterFrameEvent (event:MouseEvent):void {
addEventListener(Event.ENTER_FRAME, activate);
}
// Remove Enter Frame Event Function
function removeEnterFrameEvent (event:MouseEvent):void {
removeEventListener(Event.ENTER_FRAME, activate);
}