# A selection of frames

**URL:** <https://forum.kirupa.com/t/a-selection-of-frames/22646>\
**Category:** flash\
**Created:** [June 6, 2003, 3:57pm UTC](https://forum.kirupa.com/t/a-selection-of-frames/22646 "2003-06-06T15:57:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gustav](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/gustav/32/233_2.png) [@gustav](https://forum.kirupa.com/u/gustav)\
**Post date:** [June 6, 2003, 3:57pm UTC](https://forum.kirupa.com/t/a-selection-of-frames/22646/1 "2003-06-06T15:57:13Z")

</div>

I don’t know how to set a selection of frames to the action gotoAndplay. I would like it to go to a random frame within a settled range. As for instance a random frame of frames 1; 12-15; 20-27. (1;12;13;14;15;20;21;22;23;24;25;26;27)

I know that to make it go to a random frame within 12-15 I have to put random(4)+12

But how to make it go to a random frame within two selections or two frames that don’t follow each other like 1; 12-15; 20-27

thanks, gustav
