View Full Version : Random Frame
Seb Hughes
April 13th, 2005, 02:50 PM
I have a button and i want it so when it is pressed it plays a random frame between frame 10 and 20, what is the as then can do this?
kBisk
April 13th, 2005, 02:58 PM
Yes it can be done...the button AS is below:
on (press) {
gotoAndPlay(random(11)+10);
}
amnos
April 13th, 2005, 03:06 PM
myMc.onRelease = function(){
var ranNum = Math.floor((Math.random()*10)+10);
targetMc.gotoAndPlay(ranNum);
}
Hope this helps!
Greg
nathan99
April 13th, 2005, 09:44 PM
http://www.kirupa.com/forum/showthread.php?t=92592 :D
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.