# Flash 8 Random Navigation

**URL:** <https://forum.kirupa.com/t/flash-8-random-navigation/217844>\
**Category:** flash\
**Created:** [March 2, 2007, 11:34am UTC](https://forum.kirupa.com/t/flash-8-random-navigation/217844 "2007-03-02T11:34:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![juliecat](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@juliecat](https://forum.kirupa.com/u/juliecat)\
**Post date:** [March 2, 2007, 11:34am UTC](https://forum.kirupa.com/t/flash-8-random-navigation/217844/1 "2007-03-02T11:34:46Z")

</div>

Dear people

I’m trying to set-up a simple random navigation using labels and an array that jumps to different points in the timeline. I’ve used a simple onpress handler to initiate. As far as I can figure this should work, however I only ever get one random selection. If I press the button again the playback head does not jump to a new random location. What am I missing here that is obvious?

p.s. thanks for the random sound tips.

julie  
xx

```auto

labelarray=["blob","blob_0","blob_1","blob_2", "blob_3"];

// calculate a random index for this array
random_anms = random(labelarray.length);

button_mc.onPress = function() {
// jump to the label at the random index
gotoAndStop(labelarray[random_anms]);

}

```
