# \[help\] Random Array?

**URL:** https://forum.kirupa.com/t/help-random-array/193088
**Category:** programming
**Created:** [July 4, 2006, 9:07am UTC](https://forum.kirupa.com/t/help-random-array/193088 "2006-07-04T09:07:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![csj16](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@csj16](https://forum.kirupa.com/u/csj16)
#### Post date: [July 4, 2006, 9:07am UTC](https://forum.kirupa.com/t/help-random-array/193088/1 "2006-07-04T09:07:05Z")

</div>

Hi

I am busy creating a game and I really need some help with an ARRAY.  
This random array I have selects X amount of frames from a MovieClip on the stage.  
var type = random(7)+1;

But if I change the “7” to a higher number it justs selects more frames, but I need to modify it so that it selects a random 15 of a possible choice of 30 frames. So whenever var “type” is called it selects 15 random frames between 1-30.

SO basically there are 30 frames inside this MC and I need to call up a random 15 of these frames when the function is executed.

I hope you understand. I’m pretty certain there is a very easy way to do this, but I have been working on this game and fixing other problems for such a long time that I don’t think my brain is functioning normally… Ha ,ha.

I would really appreciate any help. Thanks!! =)=)=):kir:
