Multiple actions
I have an animate screen on which I have 6 actions I want to choose from randomly rather than in sequence, a This Else This situation. How do I go about this?
I have an animate screen on which I have 6 actions I want to choose from randomly rather than in sequence, a This Else This situation. How do I go about this?
Hi.
What do exactly you need to randomize? Movie Clip frame or name, scene names...? In AS3 or JavaScript (HTML5)?
You could, for example, create two really simple functions to return a random value and use it for whatever you want. Like this:
AS3:
function randomize(value:int):int
{
return Math.round(Math.random() * value);
}
trace(randomize(6));
JavaScript (HTML5):
this.randomize = function(value)
{
return Math.round(Math.random() * value);
}
console.log(this.randomize(6));
Please let us know if it helps.
Regards,
JC
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.