I want that my button randomly goes to any frame between the frames 640 and 700 ?
This my code :
on (press){
gotoAndPlay(random(700)+641);
}
For that you can generate a random number between 0 and 60 and then add 640 :
var frame:Number;
on (press){
frame = Math.floor(Math.random() * 61) + 640;
gotoAndPlay(frame);
}
Hope that can help.