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

i pwn all thats all u need to know.

Wednesday, March 26, 2008

Flash player h.264 detection script

Does what it says on the label, Adobe has introduced h.264 codec inside Flash Player 9 Update 3 (v 9.0.115.0) this script detects if you have below that version installed/or flsh player 10 in that case wont matter (i hope, haha).


//Flash player h.264 detection script//
//Flash Player 9 Update 3 (v 9.0.115.0)//

res.text += '///// h.264 detection script ///// \n\n';

//dissection
fpv = System.capabilities.version.split(" ");
fpvArray = fpv[1].split(",");
fpvCurrent = Number(fpvArray[0]+"."+fpvArray[1]);
fpvBuild = Number(fpvArray[2]);

//results
trace('flash player settings\n --- \nfpv full version = '+fpv+'\nfpv current = '+fpvCurrent+'\nfpv build = '+fpvBuild+' \n\n');
res.text += 'flash player settings\n --- \nfpv full version = '+fpv+'\nfpv current = '+fpvCurrent+'\nfpv build = '+fpvBuild+' \n\n';

function fpvXcheck(){
res.text += 'run detection\n --- \n';
trace('run detection\n---');
//fpvX version check?
fpvX = 10;
//
if (fpvCurrent>=fpvX) {
trace('flash player('+fpvX+') detected h.264 supported.');
res.text += 'flash player('+fpvX+') detected h.264 supported.';
} else {
trace('flash playerX not installed, run flash9 check?');
res.text += 'flash playerX not installed, run flash9 check?';
checkCurrent();
}
}
fpvXcheck();

function checkCurrent() {
//checkCurrent
if (fpvCurrent == "9") {
trace('\nfpv current('+fpvCurrent+') = installed');
res.text += '\nfpv current('+fpvCurrent+') = installed';
checkBuild();
} else {
trace('\nfpv current('+fpvCurrent+') = incorrect, please update flash player v(9.0.115.0) or higher. \n');
res.text += '\nfpv current('+fpvCurrent+') = incorrect, please update flash player v(9.0.115.0) or higher. \n';
}
}

function checkBuild() {
//checkBuild
if (fpvBuild>=115) {
trace('\nfpv build('+fpvBuild+') = correct \n\n*successful! flash player supports h.264');
res.text += '\nfpv build('+fpvBuild+') = correct \n\n*successful! flash player supports h.264';
} else {
trace('\nfpv build('+fpvBuild+') = incorrect version, please update flash player v(9.0.115.0) or higher. \n\n*sorry! flash player doesnt support h.264');
res.text += '\nfpv build('+fpvBuild+') = incorrect version, please update flash player v(9.0.115.0) or higher. \n\n*sorry! flash player doesnt support h.264';
}
}


//end

Labels: , , , , , , , ,

Friday, August 24, 2007

//Convert a String Variable into an Integer or Numbers/Numeric’s

This sniplit converts variables into numeric’s allowing you to interact with them in that maner (adding subtracting etc).


//code

//vars
var myInt1="35";
var myInt2="35";
var varX;
//parseInt convert
myInt1=parseInt(myInt1);
myInt2=parseInt(myInt2);
//add vars
varX=myInt1+myInt2;
trace('varX: '+varX);
//end
//outputs: varX: 70

//more
http://3l3373.com/blogz0r/2007/08/xml-variable-string-to-numeric.html

Labels: , , , , ,

Thursday, April 19, 2007

//waitX

Thought this might come in handy for a few out there its a wait interval all you need to do is copy and paste this code sniplit into your timeline to get to work.

check the trace commands in the output panel for examples,

code definitions:

when the handle has been called 'waitXcall', sets a timer of 4 seconds '4*1000' then calls the interval waitX which then clears of the timer has depleted displaying the trace/goto frame.

----- code starts -----

//waitX
trace('waitX here \nWaitX by 1NF3C710N.');
waitX = function(){
clearInterval(waitXcall);
trace('waitX complete, gogogo');
//_root.play();
}
waitXcall = setInterval(waitX, 4*1000); //set the viable 4 higher value to wait longer.
//
stop();

----- code ends -----


/out. v

Labels: , , , , , , , ,

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: , , , , , ,