Skip to content

Instantly share code, notes, and snippets.

@cbranch101
Created February 4, 2013 16:00
Show Gist options
  • Save cbranch101/4707645 to your computer and use it in GitHub Desktop.
Save cbranch101/4707645 to your computer and use it in GitHub Desktop.
function loadImage(img:String):void {
securityArray = img.split("/");
securityPath = securityArray[0] + "//" + securityArray[2] + "/crossdomain.xml";
Security.loadPolicyFile(securityPath);
var imageLoader:Loader = new Loader();
//imageLoader.holder = "test";
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
imageLoader.load(new URLRequest(img));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment