____  _ ____ ____ ______ ____  
|___ \| |___ \___ \____  |___ \ 
  __) | | __) |__) |  / /  __) |
 |__ <| ||__ <|__ <  / /  |__ < 
 ___) | |___) |__) |/ /   ___) |
|____/|_|____/____//_/   |____/ 
      

i pwn all thats all u need to know.

Wednesday, April 18, 2007

//arrayage

Wrote this at work had a crazy project that required detection of a exact sequence so i made this array check0r (hope this helps someone).

//arrayX
//var arrayX = new Array("0","1","2","3","4","5");
var arrayX =[]; trace(arrayX)
trace('arrayX: '+arrayX)
for (var i=0;i[arrayX.length;i++){
trace (arrayX.join());
}
//arrayXadd
function arrayXaddit(){
arrayXadd = arrayX[0]+","+arrayX[1]+","+arrayX[2]+","+arrayX[3]+","+arrayX[4]+","+arrayX[5];
trace('arrayXadd: '+arrayXadd);
}
//arrayXcheck
function arrayXcheck(){
arrayXaddit();
if(arrayXadd == '0,1,2,3,4,5'){
trace('w000t'); trace(arrayX)
}else{
trace('b0000');
trace('arrayX: '+arrayX)
trace('arrayXadd: '+arrayXadd)
}

}
//

//this add a new var to the arrays string and does a handy trace back.
on(release){
arrayX.push(+1);
trace('arrayX: '+arrayX);
}

//this calls the function 'arrayXcheck' check if array matches.
on(release){
//var arrayX = new Array("0","1","2","3","4","5");
trace(arrayX);
arrayXcheck();
}

sorry if its abit brief will add more info later. enjoy

Labels: , , , , , ,