Mc movement using AS

Hey guys I’m trying to move a dynamically generated mc to an x,y location but it seems they are very erratic.

The dynamically generated mc is using the kirupa random movement

When a user mouses over the button resume it sets _root.mouseStatusResume to **“on” **then it makes the dynamically generated mc **dot27 **to tween into position. But as you can see from the x,y coordinates below, its not working properly, and shows up in all diff areas.

I did a trace on the x.y coordinates and here they are:

x = 440.6y = 139.8
x = 432.6y = 139.8
x = 440.6y = 139.8
x = 432.8y = 139.8

Seems that it depends on where the mc is which yields the funky x values.

Here’s my code:

onClipEvent (enterFrame) {
	if (_root.mouseStatusResume == "on"){
		//x movement
		//(constant+x)
		this._parent.dot27._x += ((198+this.resume._x) - this._parent.dot27._x)/5.0;
		//y movement
		//(constant+y)
		this._parent.dot27._y += ((117+27) - this._parent.dot27._y)/5.0;
		var message = "x = " + this._parent.dot27._x + "y = " + this._parent.dot27._y;
		trace(message);
	}
}

Thanks to everyone that responds!