# Random not really being random!#KL!@:

**URL:** https://forum.kirupa.com/t/random-not-really-being-random-kl/108578
**Category:** Uncategorized
**Created:** [April 26, 2004, 8:23pm UTC](https://forum.kirupa.com/t/random-not-really-being-random-kl/108578 "2004-04-26T20:23:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pares101](https://avatars.discourse-cdn.com/v4/letter/p/b9e5f3/32.png) [@pares101](https://forum.kirupa.com/u/pares101)
#### Post date: [April 26, 2004, 8:23pm UTC](https://forum.kirupa.com/t/random-not-really-being-random-kl/108578/1 "2004-04-26T20:23:08Z")

</div>

Hey i have this code i understand somewhat,

you can view it at [www.amikamiami.com](http://www.amikamiami.com)

My problem is that the randomness of this only apply to a part of the movie!! And it doesnt use the whole movie. what is wrong or what else am i missing?  
the size of the movie is 477 width 312 height.

MovieClip.prototype.moveMe = function(begin, end, speed) {  
if (this.\_x\<=end) {  
this.\_x += speed;  
} else {  
this.\_x = begin;  
this.\_y = Math.random()\*(64.5-0.5)+5;  
}  
};

and the movieClip

onClipEvent (load) {

```
this._y = Math.random()*(64.5-0.5)-5; 
var begin1 = (0 - (this._width / 2)) 
var end1 = (Stage.width + (this._width / 2)) 
var speed1 = Math.round (((Math.random() * 4) + 1)) 

```

}  
onClipEvent (enterFrame) {  
this.moveMe (begin1, end1, speed1)  
}
