# Snap to X,Y

**URL:** <https://forum.kirupa.com/t/snap-to-x-y/169615>\
**Category:** flash\
**Created:** [November 17, 2005, 6:52pm UTC](https://forum.kirupa.com/t/snap-to-x-y/169615 "2005-11-17T18:52:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rynobot](https://avatars.discourse-cdn.com/v4/letter/r/bbce88/32.png) [@rynobot](https://forum.kirupa.com/u/rynobot)\
**Post date:** [November 17, 2005, 6:52pm UTC](https://forum.kirupa.com/t/snap-to-x-y/169615/1 "2005-11-17T18:52:23Z")

</div>

Hey -  
i know its easy and that its out there - just can’t seem to find it.  
i need my movie clip to snap to the xy coordinates to keep the text sharp.  
applied to this code:

```auto
onClipEvent (load) {
	_x = 1280;
	_y = 0;
	speed = 5;
}
onClipEvent (mouseMove) {
	endX = _root._xmouse;
	endY = _root._ymouse;
}
onClipEvent (enterFrame) {
	_x += (endX-_x)/speed;
	_y += (endY-_y)/speed;
}

```

thanks! :love:
