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)//
//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'; } }
//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.
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.
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.
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'.
//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)
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).
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.
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; } }
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.
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.
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();
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
well i'm a graphic/flash designer/developer, i play to much MMORPG/FPS ;o love listening to orchestral style black/death metal. all that are from the electronic world i am the 1NF3C710N.