# Movie Clip \_x Direction and pause

**URL:** <https://forum.kirupa.com/t/movie-clip--x-direction-and-pause/255844>\
**Category:** flash\
**Created:** [March 27, 2008, 2:43pm UTC](https://forum.kirupa.com/t/movie-clip--x-direction-and-pause/255844 "2008-03-27T14:43:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bifurd](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@bifurd](https://forum.kirupa.com/u/bifurd)\
**Post date:** [March 27, 2008, 2:43pm UTC](https://forum.kirupa.com/t/movie-clip--x-direction-and-pause/255844/1 "2008-03-27T14:43:01Z")

</div>

I have a movie clip (main\_mc) moving from right to left, stopping on rollOver and continuing to move on rollOut like this:

onClipEvent (enterFrame)  
{  
\_x+=(distance\*speed);  
if (\_x \> 0) \_x=-641;  
if (\_x \< -2197) \_x=-688;  
}

on(RollOver){  
this.stopped = true  
}  
on(RollOut){  
this.stopped = false  
}  
onClipEvent(enterFrame) {  
if(!this.stopped){  
speed = 2;  
this.\_x -= speed;  
}  
}

I have 2 other separate movie clips (controlLeft\_mc, and controlRight\_mc) on the stage. How can I make these 2 movie clips control the x direction of the main\_mc movie clip on rollOver?

Thanks
