# Sorry for being annoying need help in movieclip movement

**URL:** <https://forum.kirupa.com/t/sorry-for-being-annoying-need-help-in-movieclip-movement/248671>\
**Category:** flash\
**Created:** [January 10, 2008, 3:50pm UTC](https://forum.kirupa.com/t/sorry-for-being-annoying-need-help-in-movieclip-movement/248671 "2008-01-10T15:50:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![crosse](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@crosse](https://forum.kirupa.com/u/crosse)\
**Post date:** [January 10, 2008, 3:50pm UTC](https://forum.kirupa.com/t/sorry-for-being-annoying-need-help-in-movieclip-movement/248671/1 "2008-01-10T15:50:56Z")

</div>

heres the scenario … im creating a presentation where my movieclip to slowly move to direction Left and right while pressing the keyboard with its respective keys (\<Left\> and \<Right\>)…  
thank you so much for the tutorials…  
ive learned how to that… but my problem right now is that i want my movieclip to stop when it reaches a certain position… so it wont continuously run in the direction… i Press…  
right now im using this script… compliments from this forum BTW:beam:

onClipEvent(load)  
{  
acceleration=0;  
}  
onClipEvent(enterFrame)  
{  
if (Key.isDown(Key.LEFT))  
{  
acceleration–;  
}  
if (Key.isDown(Key.RIGHT))  
{  
acceleration++;  
}  
myangle=\_rotation;  
xmov=Math.cos(Math.PI/180\*myangle)_acceleration;  
ymov=Math.sin(Math.PI/180_myangle)\*acceleration;  
\_x+=xmov;  
\_y+=ymov;  
}

… i could stop my movie clip when if press the other direction… but i was thinking that could it be stopped in a certain position even when pressing the key ive used.

thanks so much for your help Guys:beam:
