# Follow mouse: freezed movement

**URL:** <https://forum.kirupa.com/t/follow-mouse-freezed-movement/36242>\
**Category:** Uncategorized\
**Created:** [November 24, 2003, 3:51pm UTC](https://forum.kirupa.com/t/follow-mouse-freezed-movement/36242 "2003-11-24T15:51:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ubik](https://avatars.discourse-cdn.com/v4/letter/u/b38774/32.png) [@Ubik](https://forum.kirupa.com/u/Ubik)\
**Post date:** [November 24, 2003, 3:51pm UTC](https://forum.kirupa.com/t/follow-mouse-freezed-movement/36242/1 "2003-11-24T15:51:05Z")

</div>

hello !  
I tried to make a mc that follow my cursor according to a button but the movement is “freezing” don’t know to what it is due here’s the actionscript i used  
[AS]  
tarX = m.\_x;  
tarW = m.\_width;  
m.onEnterFrame = function() {  
this.\_x = tarX-(tarX-this.\_x)/1.2;  
this.\_width = tarW-(tarW-this.\_width)/1.2;  
};  
facilites.onRollOver = function() {  
tarX = this.\_x;  
tarW = this.\_width;  
}  
fictions.onRollOver = function() {  
tarX = this.\_x;  
tarW = this.\_width;  
}  
docus.onRollOver = function() {  
tarX = this.\_x;  
tarW = this.\_width;  
}  
indus.onRollOver = function() {  
tarX = this.\_x;  
tarW = this.\_width;  
}[/AS]  
Maybe someone konw this script, i found it on the forum and cut some lines i didn’t need ! :whistle:
