I am inexperienced with flash. I am trying to insert code into a flash file that will make the file load on a random frame each time the page is loaded. I have read another similar post and have tried using the code provided, unsuccessfully. I wonder if I put the code in the wrong place or there might be something I am missing.
This is a very simple time line with 4 keyframes. I just need the file to randomly "go to and stop" on any of those frames when users load my the web page.
var arr = new Array(2, 3, 4, 5);
var rnd = Math.floor(Math.random()*arr.length);
gotoAndStop(arr[rnd]); // Or gotoAndStop, depending on what you want to do.