# Pointer to mouse on timeline

**URL:** <https://forum.kirupa.com/t/pointer-to-mouse-on-timeline/32338>\
**Category:** Uncategorized\
**Created:** [October 5, 2003, 1:16pm UTC](https://forum.kirupa.com/t/pointer-to-mouse-on-timeline/32338 "2003-10-05T13:16:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ichido](https://avatars.discourse-cdn.com/v4/letter/i/43a26b/32.png) [@ichido](https://forum.kirupa.com/u/ichido)\
**Post date:** [October 5, 2003, 1:16pm UTC](https://forum.kirupa.com/t/pointer-to-mouse-on-timeline/32338/1 "2003-10-05T13:16:27Z")

</div>

Normally when u wan movie clip to following mouse was to have the following code which was put inside the movie clip itself

onClipEvent(enterFrame){  
\_x = \_root.\_xmouse;  
\_y = \_root.\_ymouse;  
}

BUT…wat happen if we wan to write the script on the main timeline and let the movieclip to follow the mouse…what should the code be?  
thx for reading
