i am new in actionscript.
actually i want to move a man to a location where user clicks.
but the problem is i don't know how to do this..
Can anyone help me??
import mx.transitions.Tween;
import mx.transitions.easing.*;
function moveToMouse(targetClip:MovieClip, timeSpan:Number) {
this.onMouseDown = function() {
var xM:Number = _root._xmouse;
var yM:Number = _root._ymouse;
var cX:Number = targetClip._x;
var cY:Number = targetClip._y;
var clickTweenX = new Tween(targetClip, "_x", Strong.easeOut, cX, xM, timeSpan, true);
var clickTweenY = new Tween(targetClip, "_y", Strong.easeOut, cY, yM, timeSpan, true);
};
}
moveToMouse(ManmovieClip, 5);
---------------------------------------------------------------------- -----------------------------------------------------------------
i tried above code..but still i am not getting success....
North America
Europe, Middle East and Africa
Asia Pacific