Clase:
Actionscript:
-
package {
-
/**
-
* ...
-
* @author LeoBaraldi
-
//ejemplo> Randomize.getRandom(10,100)
-
*/
-
public class Randomize {
-
public static function Random(_min:Number, _max:Number):Number {
-
var num:Number = Math.floor(Math.random() * (_max - _min + 1)) + _min;
-
return num;
-
}
-
}
-
}
Uso:
Actionscript:
-
import Randomize
-
trace(Randomize.Random(0,100))