# n00b cant get startdrag to work

**URL:** <https://forum.kirupa.com/t/n00b-cant-get-startdrag-to-work/144753>\
**Category:** Uncategorized\
**Created:** [April 16, 2005, 10:39pm UTC](https://forum.kirupa.com/t/n00b-cant-get-startdrag-to-work/144753 "2005-04-16T22:39:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![HumanZoo](https://avatars.discourse-cdn.com/v4/letter/h/dbc845/32.png) [@HumanZoo](https://forum.kirupa.com/u/HumanZoo)\
**Post date:** [April 16, 2005, 10:39pm UTC](https://forum.kirupa.com/t/n00b-cant-get-startdrag-to-work/144753/1 "2005-04-16T22:39:12Z")

</div>

here is the code… but i just want the movie to remain in the center of the flash movei without moving into the top left hand corner… the x y are at the exact spot i want the animation to stay at untill someone clicks the flash… but its keeps moving to the top left hand corner…can someone help me out please… thanks… Zoo

onClipEvent (load) {  
\_x = 236;  
\_y = 30;  
speed = 5;  
}  
onClipEvent (mouseDown) {  
endX = \_root.\_xmouse;  
endY = \_root.\_ymouse;  
}  
onClipEvent (enterFrame) {  
\_x += (endX-\_x)/speed;  
\_y += (endY-\_y)/speed;  
}
