PDA

View Full Version : checkPolicyFile = true;



BenBart
January 13th, 2009, 10:44 PM
var context:LoaderContext = new LoaderContext();
context.checkPolicyFile = true;

var loader:Loader = new Loader();
//Security.checkPolicyFile = true;
var img_url:String = img_src;
var request_url:URLRequest = new URLRequest(img_url);

loader.load(request_url);

For some reason the loader isn't checking the policy file, how do you called "checkPolicyFile = true" correctly?

BenBart
January 13th, 2009, 11:24 PM
var context:LoaderContext = new LoaderContext();
context.checkPolicyFile = true;

var loader:Loader = new Loader();
//Security.checkPolicyFile = true;
var img_url:String = img_src;
var request_url:URLRequest = new URLRequest(img_url);

loader.load(request_url);For some reason the loader isn't checking the policy file, how do you called "checkPolicyFile = true" correctly?


Figured it out, when you use the "load" command, you pass the LoaderContext;


loader.load(request_url, context);