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

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

Thursday, October 11, 2007

Stage.align

//stage align

I used it on this project, zombiedeathsquad.com to keep the alignment centered.

//usage

Stage.align


//value //vertical //horizontal
"T" top center
"B" bottom center
"L" center left
"R" center right
"TL" top left
"TR" top right
"BL" bottom left
"BR" bottom right

I have written a code snippet below to handle the resize of flash/browser window to scale arrordingly to the stage.

set your flash embed tags within your HTML page to '100%' width/height.


//action script code


//center align
Stage.scaleMode = "noScale";
Stage.align = "LT"; //Left-Top see above
Stage.addListener(logo);
logo.onResize = logoCenter;
function logoCenter() {
logo._x = (Stage.width/2)-(logo._width/2);
logo._y = (Stage.width/2)-(logo._width/2);
}
logoCenter();


//details
'_width/2' halves your 'Stage.align' in two this gets your center on the page/flash.


//referance

http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary674.html
http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary680.html

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

Friday, August 3, 2007

//flash XML cache hack

here is a simple work around to this issue, by adding the parameter '?+Math.random()', flash will now be fooled into thinking it is a new URL each tme using the randomizer function each time the file gets called.


//code
xml.load("xmlData.xml?"+Math.random());

//reference
Live Docs

Labels: , , , ,

Thursday, August 2, 2007

//ipX

This tutorial shows you how to build a flash file which will show the user their IP address which they are connecting on.

//Preview






//ActionScript Code

///////////////////// Start ////////////////////////////

//crossdomain
Security.loadPolicyFile("http://localhost/crossdomain.xml");
System.security.allowDomain("*");
System.security.allowInsecureDomain("*");

//feildVars
hdrTxt.text = '//ipX_';
resTxt.text = 'loading ...';

//dataLoad
var dataX = this
varReceiver = new LoadVars();
varReceiver.load("http://localhost/ip.php");
varReceiver.onLoad = function(){
dataX.resTxt.text = "ip address: " + this.ip + "\n";
trace("ip address: " + this.ip + "\n");
};

//
stop();

///////////////////// End ////////////////////////////


//PHP Code

///////////////////// Start ////////////////////////////

$ip = getenv('REMOTE_ADDR');
$ip = "&ip=".$ip."&amp;amp;";
echo $ip;

///////////////////// End ////////////////////////////

//Sample files
http://3l3373.com/dl/tutorials/ip/ipX_.rar

//Additional info
crossdomain guide (http://3l3373.com/blogz0r/2007/08/crossdomain-guide.html).

Labels: , , ,

//crossdomain guide

How to 'Crossdomain' guide, here is all you need to get you started (below). Crossdomain basically allows you to connect between servers (i.e. load in external files from external URLs/domains) pretty handy when you need information sitting on external servers.

This needs to be added to the file you are trying to receive the information from.


//crossdomain Action Script Code
Security.loadPolicyFile("http://domainX.com/crossdomain.xml");
bc[as].System.security.allowDomain("*.domainX.com");
bc[as].System.security.allowInsecureDomain("*.domainX.com");
System.security.allowDomain("*.domainX.com");
System.security.allowInsecureDomain("*.domainX.com");
System.security.allowDomain("*");
System.security.allowInsecureDomain("*");

This need to be added to the _root of the external server you are trying to connect to to receive the data into the flash. XML files needs to be called 'crossdomain.xml'.

//crossdomain XML Code

cross-domain-policy
allow-access-from domain="*.domainX.com"
allow-access-from domain="*"
cross-domain-policy
http://3l3373.com/dl/tutorials/crossdomain/crossdomain.xml


Eyeblaster Crossdomain IPs/URLs
http://3l3373.com/dl/tutorials/crossdomain/eb_crossdomain.xml

//Sample Files
http://3l3373.com/dl/tutorials/crossdomain/crossdomain.rar

//useful links
http://moock.org/asdg/technotes/crossDomainPolicyFiles/

Labels: , , , ,

Wednesday, August 1, 2007

//arrayX _sort

Here’s an example of how to sort an array either using 'Numeric’s' or 'Alphabet' characters …

//Sample




//Action Script


//////////// Start ////////////

//feildVars
hdrTxt.text = '//arrayX_sort';
resTxt.text = 'loading ...';

//sort_array
trace('//arrayX_sort \n');

//alphabet array
trace('//alphabet array');
resTxt.text = '//alphabet array \n';
var alphabet_array:Array = new Array("d", "e", "a", "b", "c");
trace('show array: \n'+alphabet_array);
resTxt.text += 'show array: \n'+alphabet_array+'\n';
alphabet_array.sort();
trace('sorts array: \n'+alphabet_array);
resTxt.text += 'sorts array: \n'+alphabet_array+'\n';
alphabet_array.sort(Array.DESCENDING);
trace('sorts array desc: \n'+alphabet_array+'\n');
resTxt.text += 'sorts array desc: \n'+alphabet_array+'\n\n';

//numeric array
trace('//numeric array');
resTxt.text += '//numeric array \n';
var numeric_array:Array = new Array("14", "15", "13", "12", "11");
trace('show array: \n'+numeric_array);
resTxt.text += 'show array: \n'+numeric_array+'\n';
numeric_array.sort();
trace('sorts array: \n'+numeric_array);
resTxt.text += 'sorts array: \n'+numeric_array+'\n';
numeric_array.sort(Array.DESCENDING);
trace('sorts array desc: \n'+numeric_array+'\n');
resTxt.text += 'sorts array desc: \n'+numeric_array+'\n';
//end
trace('//end sort');
resTxt.text += '\n //end _sort \n';
//

//////////// END ////////////

//Sample files
http://3l3373.com/dl/tutorials/arrayX/arrayX_sort.rar

//Additional Info
http://3l3373.com/blogz0r/2007/04/arrayage.html
Live Docs

Labels: , , ,

Wednesday, July 25, 2007

//activate ActiveX

How to get rid of that anoying activeX controller ...

Usage embed under these tags on your page:

[head]
[script language="JScript" type="text/jscript" src="ax_hdr.js"][/script]

[/html]
[script language="JScript" type="text/jscript" src="ax_ftr.js"][/script]

/*
activateActiveX - header
---------------
*/

//trap onload event
window.onload = function () {
//Determine browser, we only need this for Internet Explorer
if (navigator.appName == "Microsoft Internet Explorer") {

//Array of elements to be replaced
var arrElements = new Array(3);
arrElements[0] = "object";
arrElements[1] = "embed";
arrElements[2] = "applet";


//Loop over element types
for (n = 0; n < replaceobj =" document.getElementsByTagName(arrElements[n]);" i =" 0;" parentobj =" replaceObj[i].parentNode;" newhtml =" parentObj.innerHTML;" innerhtml =" newHTML;" appname ="=" arrelements =" new" n =" 0;" replaceobj =" document.getElementsByTagName(arrElements[n]);" i =" 0;" parentobj =" replaceObj[i].parentNode;" newhtml =" parentObj.innerHTML;" innerhtml =" newHTML;" style="font-weight: bold;">Download
sample code (http://3l3373.com/dl/tutorials/activeX/ax_.rar)

Labels: , , ,

Monday, July 23, 2007

//Shared Objects [v1.0]

//Sample




//Facts
  • path: Shared objects are stored locally on the users machine here is the path: C:\Documents and Settings\[login name]\Application Data\Macromedia\Flash Player\#SharedObjects\ (within the '#SharedObjects' file browse for a folder 'localhost' for local testing if testing remotely locate URL name i.e. 'servername.com' etc. within that file there will be a file labeled 'fileX.sol').
  • size: shared objects can only store 100KB from each URL thereafter it overwrites it.
  • extension: .SOL = Local Shared Object (stands for).
//Code

/////////////////////////////////////////
// START / frame1 / frame label 'edit' //
/////////////////////////////////////////

//[section]:edit
trace('edit');
hdrTxt.text = '//edit data';
//[vars]:txt
nameTxt.text = 'enter name'; trace(nameTxt)
emailTxt.text = 'enter email'; trace(emailTxt)
//[shdObj]:check it
var userData = SharedObject.getLocal("fileX", "/");
if (userData.data.namex != undefined){
gotoAndStop('sav');
}
//[shdObj]:save func
function shdObjSav(){
trace("saved oBjs");
var userData = SharedObject.getLocal("fileX", "/");
userData.data.namex = nameTxt.text;
userData.data.emailx = emailTxt.text;
gotoAndStop('sav');
}
//[btn]:save
savBtn.onRelease = function() {
trace("save btn");
gotoAndStop("save");
shdObjSav();
};
//
stop();

///////////////////////
// END CODE / frame1 //
///////////////////////

/////////////////////////////////////////
// START / frame2 / frame label 'save' //
/////////////////////////////////////////

//[section]:save
trace('save');
hdrTxt.text = '//saved data';
//[shdObj]:read data
var userData = SharedObject.getLocal("fileX", "/");
nameTxt.text = userData.data.namex;
emailTxt.text = userData.data.emailx;
//[btn]:delete
delBtn.onRelease = function(){
trace("delete");
userData.clear();
gotoAndStop("edit");
};
//
stop();

///////////////////////
// END CODE / frame2 //
///////////////////////


//Download

shdObj_v1.rar

Labels: , ,

Wednesday, July 11, 2007

ASV - ASR - UAE huh? ..

You're probably wondering what this means...

ASV = Actionscript viewer
ASR = Actionscript replacer
UAE = URL Action Editor

These neat utilities allow you to edit URLs Actionscript on the fly without even opening a FLAs... its a good thing if you don't have the source files and need to update URLs etc esp. if the FLA files are corrupt and you don't have a backup (but then your better off decompiling the SWfs) i use Sothink Decompiler.

Here are a few other useful utilities:
Swifty Utilities
Captionate

Hope this sheds some light.

Labels: , , , , , , , ,

Wednesday, June 27, 2007

//image scroller [v1.0]



Haven’t posted anything in a while been so busy with life ATM which is finally looking good right now for once …

Was making a top friends image scroller for Myspace really hate having to number my friends so I decided to make a scroller instead might even make it load in the images/friends randomly.

//image scroller [v1.0]

Make a MC (MovieClip) on your flash stage, then select it and open up the actions panel (F9) add this bit of AS (ActionScript).

onClipEvent(enterFrame){
_x = _x+2; //moves the MC two pixels
if (_x>=420){ //if MC reaches 420px goes back to original position
_x = -360;
}
}

Labels: , , , , , , , ,

Thursday, April 26, 2007

L4T3NCY(com) - Redefining Speed!

I have just launched a hosting company called L4T3NCY(com). It will offer an array of hosting environments to cater for the advanced internet user:

- Highend dedicated server racks, with full root access.
- Managed/Dedi Game servers (CSS BF2142 COD).
- Web/Email hosting, PHP/MYSQL (+ all the rest).
- Flash media server 2 (streaming content).
- Plus loads more...

Please take a look and let me know if you need anything.

out//v

Labels: , , , , , , , , , , , , , , ,

Monday, April 23, 2007

//randomizeX

This is a randomizer script once the function has been called it randomly selects a value between 1-3 then runs an if statement to detect which variable has been generated then calls the action in this case outputs it into a trace command.

//randomizeX
function ranX(){
ranXmath = Math.round((Math.random()*2)+1);
trace(ranXmath);
if(ranXmath == '1'){
trace('ran1 selected')
}
if(ranXmath == '2'){
trace('ran2 selected')
}
if(ranXmath == '3'){
trace('ran3 selected')
}
}
ranX();
//
stop();

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