Randomize

snipped by Schyfis

A really simple function that returns a random number between a given number and the negative of the given number. It's great for actionscripted game effects like positioning a ship's thrust. Basically, it saves you from writing random(x)-random(x) every time.

Yep, it's just one line of code that saves you from typing about 7 characters. Nevertheless, it's easier to look at in code than random(x)-random(x). Usage: someMovieClip._x=randomize(10); //instead of someMovieClip._x=random(10)-random(10);

randomize=function(n){
	return random(n)-random(n);
}