Hello,
package blah.blah.blah {
// Imports...
dynamic public class Main extends MovieClip {
public function Main() {
addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event):void {
removeEventListener(Event.ADDED_TO_STAGE, init);
// This works:
//flash.system.Security.loadPolicyFile('http://somdomain.com/crossdomain.xml');
// This does not work:
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
if (paramObj.policyFile != null) {
flash.system.Security.loadPolicyFile(paramObj.policyFile.toString());
}
// ...
// ...
}
}
}
Questions:
- Is it possible to load multiple policy files from differing domains? If so, could someone point me to some example code?
- How can I specify a policy file via a flashvar? In the above code, I have tried to load a policy via swfObject flashvars, but it does not load. Is this possible to do?
Optimally, I would like to be able to specify two different policy files, from different domains, via one flash variable.
At the very minimum, I would like to be able to load one policy file via a swfObject flashvar… Is there a good way to do this?
Thanks a billion in advance for the help!
Cheers,
Micky