# Problems with go to random frame function. Please help!

**URL:** https://forum.kirupa.com/t/problems-with-go-to-random-frame-function-please-help/155331
**Category:** flash
**Created:** [July 16, 2005, 2:44pm UTC](https://forum.kirupa.com/t/problems-with-go-to-random-frame-function-please-help/155331 "2005-07-16T14:44:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![spindrift](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@spindrift](https://forum.kirupa.com/u/spindrift)
#### Post date: [July 16, 2005, 2:44pm UTC](https://forum.kirupa.com/t/problems-with-go-to-random-frame-function-please-help/155331/1 "2005-07-16T14:44:00Z")

</div>

Hi all,

Thank you for reading this…

I have a header swf for a webste I’m doing with 5 images which hold for 7 seconds using setInterval. After these 7 seconds, I want it to jump at random to with frame 1, 3, 5, 7 or 9 to show a different image. For this part I’m using the randomframe(); function.

There are a couple of problems with this. Firstly, the only frames it selects are 1, 3 and 9. Also, the swf sometimes just stops on the last image. This is only when I test the movie from Flash - when I uploaded the site and went to view it, the swf just stays on the first image.

I’ve tried a few things like putting the code in different places but to no avail but was wondering if someone could please take a look at my fla to see if they can see what the problem is. [Here’s the link…](http://www.spindriftmedia.com/header.zip)

Thank you very much for taking the time to look at this and help me out and I hope to hear from you.

Take care,

Mark
