# A Whole Bunch of Randoms

**URL:** <https://forum.kirupa.com/t/a-whole-bunch-of-randoms/279226>\
**Category:** flash\
**Created:** [January 12, 2009, 2:31am UTC](https://forum.kirupa.com/t/a-whole-bunch-of-randoms/279226 "2009-01-12T02:31:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanDaMan](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@DanDaMan](https://forum.kirupa.com/u/DanDaMan)\
**Post date:** [January 12, 2009, 2:31am UTC](https://forum.kirupa.com/t/a-whole-bunch-of-randoms/279226/1 "2009-01-12T02:31:38Z")

</div>

Can someone please help me with my dilemma? I’m trying to make something that creates an instance of a certain class. Then that child executes certain functions. I got that. Now I need to make something that creates these instances at a set y coordinate, but a random x coordinate between 1 and the stage width. I did that using Math.random between 1 and stage.stageWidth. Now here comes my dilemma (if you actually read this far):

I need to make the function that creates these instances at random x coordinates create them at random times. For instance, one time that this is executed, the instances could be created at the x coordinates of 5, 368, and 231, at the times of 10 frames, 18 frames, and 6 frames. But the instances cannot be created in less than 5 frames, and later than 30 frames.

I would REALLY REALLY REALLY appreciate any help with this. I REALLY can’t get this to work right and I’ve been working on this for a REALLY long time. So please, if you can, help me out here =D

Thanks,  
DanDaMan
