function randomMinMax(min:Number, max:Number):Number { return (min + (Math.random() * Math.abs(max - min))); }
This function is called by passing a range of minimum and maximum values.
Example:
randomMinMax(1, 10);
Example outputs: