Jump to content

GotoandStop (Random Frame)


Kokisho

Recommended Posts

Well im trying to make a button where you press it and it gets you to a random frame between, lets say4-7, how would I go about this?Is there some command like:GotoandStop (RandomFrame)Or would I have to create a variable?Any help would be appreciated, thanks. :)

Link to comment
Share on other sites

maybe only possible with variable :)

function randRange(min:Number, max:Number):Number {	var randomNum:Number = Math.floor(Math.random() * (max - min + 1)) + min;	return randomNum;}var n:Number = randRange(4,7);gotoAndStop(n);

from Flash 8 Help

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...