well im using the as2 for my scripting purpose
yes i have got some code.. butits not working...
CODE
// NON REPAETING OF RANDOM NUMBERS (SETS)
var Found = false;
var Current = new Array();
var MaxValue = 36;
// total number of sets
var NumUnique = 1;
// specifies the number of unique numbers required
var Count = 0;
var Current = new Array(NumUnique);
GetUnique();
//+","+Current[1]+", and"+Current[2]+", and "+Current[3]
function GetUnique() {
trace("GetUnique");
trace("NumUnique" +NumUnique);
/*Count++;
trace("Count"+Count);
//trace("the unique number are:"+Current[0]);
*/
for (i=0; i<MaxValue; i++) {
trace("i "+i);
Found = false;
var rndValue = get_random();
var j = 0;
for (j=0; j<Current.length; j++) {
if (Current[j] != rndValue) {
Found = true;
break;
}
}
if (Found != true) {
//Count--;
Current[Count] = rndValue;
count++;
} else {
//Current[Count] = rndValue;
}
}
_root.sets.gotoAndStop(Count);
//trace(Current[Count]);
}
function get_random() {
trace("get_rdm");
var ranNum = Math.round(Math.random()*MaxValue);
return ranNum;
}