# \[AS 2\] Firefox Bug

**URL:** <https://forum.kirupa.com/t/as-2-firefox-bug/245217>\
**Category:** flash\
**Created:** [November 27, 2007, 4:29pm UTC](https://forum.kirupa.com/t/as-2-firefox-bug/245217 "2007-11-27T16:29:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![josuason](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@josuason](https://forum.kirupa.com/u/josuason)\
**Post date:** [November 27, 2007, 4:29pm UTC](https://forum.kirupa.com/t/as-2-firefox-bug/245217/1 "2007-11-27T16:29:54Z")

</div>

I have this random goto frame and play function on frame 1  
and in the end of the animation I have it set to go back to  
frame 2 and loop the animation.

This works great in Safari, I´m going home to try it out on my PC  
but in FIREFOX it skips frame 1 AS and goes directly to frame number  
2 and the animation loops?

Does anybody have any ideas on this?

```auto

stop();

Array.prototype.shuffle=function(){
   for(i=0;i<this.length;i++){
      var tmp=this*;
      var randomNum=random(this.length);
      this*=this[randomNum];
      this[randomNum]=tmp;
   }
}
var myFrames = new Array(2,12,22,32,42)
myFrames.shuffle()

var index = 0;

if(myFrames[index++]){
gotoAndPlay(myFrames[index])
}else{
index = o
}

```
