# Why can't i get this. this should be easy for everyone else

**URL:** <https://forum.kirupa.com/t/why-cant-i-get-this-this-should-be-easy-for-everyone-else/6610>\
**Category:** Uncategorized\
**Created:** [October 11, 2002, 11:50pm UTC](https://forum.kirupa.com/t/why-cant-i-get-this-this-should-be-easy-for-everyone-else/6610 "2002-10-11T23:50:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![murphman](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@murphman](https://forum.kirupa.com/u/murphman)\
**Post date:** [October 11, 2002, 11:50pm UTC](https://forum.kirupa.com/t/why-cant-i-get-this-this-should-be-easy-for-everyone-else/6610/1 "2002-10-11T23:50:42Z")

</div>

I’m having trouble with this little dot racing thing. This is my first post on anything ever. I am trying to make 3 dots go at random speeds across a screen. then when one gets to the end, i want them all to stop. and maybe a text thing says what won. for each dot there is the code:

onClipEvent (enterFrame) {  
speed = random(5)+1;  
this.\_x += speed;  
if (this.\_x\>=510) {  
this.speed = 0;  
\_root.red.speed = 0;  
\_root.blue.speed = 0;  
}  
}

But none of the dots stop. I don’t know what i did wrong. I’m not very strong with actionscript. could someone help?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 12, 2002, 12:30am UTC](https://forum.kirupa.com/t/why-cant-i-get-this-this-should-be-easy-for-everyone-else/6610/2 "2002-10-12T00:30:40Z")

</div>

Try this instead. For Each Movieclip.

onClipEvent (enterFrame) {  
\_root.speed = random(5)+1;  
this.\_x += \_root.speed;  
if (this.\_x\>=510) {  
this.\_x = 510;  
}  
}

Might wanna play wround with the +1, a bit.  
That way u can see which makes it to the end first.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 12, 2002, 12:48am UTC](https://forum.kirupa.com/t/why-cant-i-get-this-this-should-be-easy-for-everyone-else/6610/3 "2002-10-12T00:48:02Z")

</div>

Thanx. your my first replay for my first post. i’ll have to try that now.
