# Pls help: random motion source file won't open in mx

**URL:** <https://forum.kirupa.com/t/pls-help-random-motion-source-file-wont-open-in-mx/61915>\
**Category:** Uncategorized\
**Created:** [August 23, 2004, 10:25am UTC](https://forum.kirupa.com/t/pls-help-random-motion-source-file-wont-open-in-mx/61915 "2004-08-23T10:25:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmzx](https://avatars.discourse-cdn.com/v4/letter/j/91b2a8/32.png) [@jmzx](https://forum.kirupa.com/u/jmzx)\
**Post date:** [August 23, 2004, 10:25am UTC](https://forum.kirupa.com/t/pls-help-random-motion-source-file-wont-open-in-mx/61915/1 "2004-08-23T10:25:17Z")

</div>

hi me again, more random problems!

basically i’m trying to get to grips with random motion:  
this is my current script//

createEmptyMovieClip(“paper”, 5);  
mc.setMask(paper);  
for (var i = 0; i\<20; i++) {  
myClip = paper.attachMovie(“c”, “c”+i, i);  
myClip.\_x = Math.round(Math.random()\*350);  
myClip.\_y = Math.round(Math.random()\*350)+20;  
myClip.velX = Math.round(Math.random()\*10)-5;  
myClip.velY = Math.round(Math.random()\*20)-5;  
myClip.onEnterFrame = wobble;  
}  
function wobble() {  
this.\_x += this.velX;  
this.\_y += this.velY;  
if (this.\_x\<0 || this.\_x\>0) {  
this.velX \*= -1;  
}  
if (this.\_y\<10 || this.\_y\>380) {  
this.velY \*= -1;  
}  
}

//all i want is for the x movement to be random, i’ve been trying to modify the code by taking out some of the y math.random / math.round bits…

pls can someone help me on the right track 🐇

---

<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:** [August 23, 2004, 7:45pm UTC](https://forum.kirupa.com/t/pls-help-random-motion-source-file-wont-open-in-mx/61915/2 "2004-08-23T19:45:16Z")

</div>

ps: by the way i have been trying to open the tutorial file “four.fla” but it won’t let me open in flash mx… can anyone verify. pls. the force is weak today : )
