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?