# Simple movement problems

**URL:** <https://forum.kirupa.com/t/simple-movement-problems/168821>\
**Category:** Uncategorized\
**Created:** [November 10, 2005, 11:02am UTC](https://forum.kirupa.com/t/simple-movement-problems/168821 "2005-11-10T11:02:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lostinscript](https://avatars.discourse-cdn.com/v4/letter/l/aeb1de/32.png) [@lostinscript](https://forum.kirupa.com/u/lostinscript)\
**Post date:** [November 10, 2005, 11:02am UTC](https://forum.kirupa.com/t/simple-movement-problems/168821/1 "2005-11-10T11:02:37Z")

</div>

Hi,

I have a movie clip that i want to attach to the stage and then move…I can attach it but i cant get it to move…Here is the script i used. Any ideas? I have the code in a movie clip on the stage. I have also tried using…this.\_x += xmov but find that other things on the stage move along with the ball.

Quote:  
onClipEvent (load) {  
timeBetweenBalls = 2000;  
nextBall = getTimer() + timeBetweenBalls;  
score = 0;  
numBalls = 0;  
lastBall = 0  
xmov = 5;  
}

onClipEvent (enterFrame) {  
// see if it is time for the next ball  
if (getTimer() \>= nextBall) {

// shorter wait next time  
timeBetweenBalls -= 10;

//attach ball and then move it  
attachMovie(“ball”, “ball”+lastBall, lastBall);  
\_root[“ball”+lastBall].\_x += xmov;  
}  
}
