This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var randomChars:String = "A_B_C_D_E_F_G_H_I_J_K_L_M_N_O_P_!_@_#_$_%_^_&_!_ _ _ _ _ _ _" | |
var charArray:Array = randomChars.split("_"); | |
function descramble(speed:int, txt:TextField):void{ | |
var originalString:String = txt.text; | |
var newFragment:String; | |
var newString:String; | |
var characterNum:int = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function proportionalResizeToFit(resizingMC:Object, referenceMC:Object, useHeight:Boolean){ | |
var origWidth:Number = resizingMC.width; | |
var origHeight:Number = resizingMC.height; | |
var ratio:Number = origHeight / origWidth; | |
if (useHeight){ | |
resizingMC.height = referenceMC.height; | |
resizingMC.width = resizingMC.height / ratio; | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var nc:NetConnection = new NetConnection(); | |
nc.connect(null); | |
var ns:NetStream = new NetStream(nc); | |
ns.client = {}; | |
ns.client.onMetaData = nsOnMetaData; | |
ns.client.onCuePoint = nsOnCuePoint; | |
ns.addEventListener(NetStatusEvent.NET_STATUS, nsOnNetStatus); | |
ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getBrowserName():String | |
{ | |
var browser:String; | |
//Uses external interface to reach out to browser and grab browser useragent info. | |
var browserAgent:String = ExternalInterface.call("function getBrowser(){return navigator.userAgent;}"); | |
//Determines brand of browser using a find index. If not found indexOf returns (-1). | |
if(browserAgent != null && browserAgent.indexOf("Firefox")>= 0) { | |
browser = "Firefox"; | |
} | |
else if(browserAgent != null && browserAgent.indexOf("Safari")>= 0){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import flash.events.Event; | |
this.addEventListener(Event.ENTER_FRAME, loop); | |
var drag:Number = 10; | |
var mc:MovieClip = new MovieClip; | |
var gfx:Graphics = mc.graphics; | |
gfx.beginFill(0x000000); | |
gfx.drawCircle(0,0,10); | |
addChild(mc); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bmd:BitmapData = new BitmapData(800,600,false, 0x000000); | |
addChild(new Bitmap(bmd)); | |
bmd.fillRect(bmd.rect, 0x000000); | |
for (var i:Number = 0; i<=1; i+= 0.01) { | |
var xp:Number = b(i, 100, 300, 500); | |
var yp:Number = b(i, 300, 100, 300); | |
bmd.setPixel(xp, yp, 0xFFFFFF); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function calulateInterpoint(p1:Point,p2:Point,percent:Number ):Point | |
{ | |
var temporaryPoint:Point = new Point; | |
temporaryPoint.x = p1.x + ( p2.x - p1.x ) / (100/percent) | |
temporaryPoint.y = p1.y + ( p2.y - p1.y ) / (100/percent) | |
return temporaryPoint; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$browser = getenv(“HTTP_USER_AGENT”); | |
echo '<p>HTTP User Agent is: ' . $browser . '</p>'; | |
if (eregi(‘iPhone’, $browser)) | |
{ | |
echo 'You are using an iPhone'; | |
} | |
else if (eregi(‘Blackberry’, $browser)) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript"> | |
function redirect(url) | |
{ | |
window.location.href = url; | |
} | |
</script> | |
</script> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a:focus { | |
outline: none; | |
} |
OlderNewer