Archive

Posts Tagged swf

Custom URLLoader with timeout.

I came across an issue yesterday loading ads from ad.doubleclick.net. For some reason, the crossdomain.xml file from ad.doubleclick.net was unavailable and the URLLoader class making the call eventually threw a Security Error, as the crossdomain policy is the first thing it looks for when making calls outside the SWF’s Security Domain. This is easily handled [...]

Read on

Standardizing runtime asset loads (incl. Runtime fonts!).

I’ve been looking for better ways to reduce the size of my main app swfs. Loading assets at runtime has proven to be a flexible solution that saves size in the initial load and throughout the use of the app, as only files essential to the current view can be loaded in. I found myself [...]

Read on

A quick note on document.location.href

Added this to my NetUtil class for easy access to an embedded swf’s parent url. public static function get parentUrl():String { if(ExternalInterface.available) { try { var parent:String = String( ExternalInterface.call(” function(){ return document.location.href.toString();}”)); return parent; } catch(error:Error){} catch (error:SecurityError){} } return ”; } Just be sure you have AllowScriptAccess set to “always” in your embed [...]

Read on

Remote content loading in AS3. Phew!

I did a little research recently when trying to figure out the ins and outs of transferring content over to a CDN. Doing this should save both load time and money, but figuring out security issues with Flash content that loads from remote, sometimes unknown locations can be frustrating. Here’s what I’ve learned: Several things [...]

Read on