# Repositioning conflict

**URL:** https://forum.kirupa.com/t/repositioning-conflict/88627
**Category:** Uncategorized
**Created:** [May 1, 2005, 4:43am UTC](https://forum.kirupa.com/t/repositioning-conflict/88627 "2005-05-01T04:43:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Insomniac](https://avatars.discourse-cdn.com/v4/letter/i/bb73d2/32.png) [@Insomniac](https://forum.kirupa.com/u/Insomniac)
#### Post date: [May 1, 2005, 4:43am UTC](https://forum.kirupa.com/t/repositioning-conflict/88627/1 "2005-05-01T04:43:05Z")

</div>

I have an mc with the following code:

onClipEvent (load)  
{  
xcenter=495;  
speed=1/10;  
}  
onClipEvent (enterFrame)  
{  
var distance=\_root.\_xmouse-xcenter;  
\_x-=(distance\*speed);  
if (\_x \> 1410) \_x=1410;  
if (\_x \< -400) \_x=-420;  
}

onClipEvent (enterFrame) {  
spd = 8;  
this.\_x += (endX-\_x)/spd;  
}

On a couple of buttons within the mc, I have code like this:

on (release){  
endX = -40;  
}

with various endX values. The buttons work perfectly. The sliding of the image (behind a mask) also works perfectly (when the mouse goes right the image slides left)… but, if I press one of the buttons and then try to slide across with the mouse, the movement is severely hampered, so that I can’t move as far or as fast. I have a rough idea of why this is happening, but I haven’t figured out a way to fix it. I’m hoping to launch this site in 8 hours so help is very much appreciated!
