A little actionscript to get a random number (n) is this case.
low = 0;
high = 360;
function randRange(min:Number, max:Number):Number {
var randomNum:Number = Math.floor(Math.random() * (max - min + 1)) + min;
return randomNum;
}
for (var i = 0; i < 1; i++) {
var n:Number = randRange(low, high)
trace(n);
}
Wednesday, January 21, 2009
Flash Random Number generator
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment