i have tried several solution i have found for this problem but cant get any to work.
i want a button in flash as3 to goto and stop at a random frame. (ie a frame between 20 and 30)
below is what i thought would work, although i have tried other code this is what makes most sense to me;
stop();
/*random number bit
*/
function randomNumber(low:Number=20, high:Number=30):Number
{
return Math.floor(Math.random() * (1+high-low)) + low;
}
/*THE BUTTON ACTION
*/
movieClip_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame);
function fl_ClickToGoToAndStopAtFrame(event:MouseEvent):void
{
gotoAndStop(randomNumber);
}
please help
cheers