flex - Cross-domain policy issues after redirect in Flash -


i'm having trouble cross-domain policy. i'm using as3 loader fetch image; i'm making load policy file, :

var ploader : loader = new loader();              var pcontext : loadercontext = new loadercontext(); pcontext.checkpolicyfile = true;  ploader.load(new urlrequest(surl), pcontext); 

this works fine long image directly accessible; however, when server sends redirect, loader follows loses checkpolicyfile flag, resulting in securityexception - is, doesn't check cross-domain policy of redirected url.

i've found solution here ( http://www.stevensacks.net/2008/12/23/solution-as3-security-error-2122-with-300-redirects ) looks fragile (that is, looks fail if there's more 1 redirect). correct way of doing this?

edit : best solution use new loader if accessing content throws securityexception , loaded url different 1 requested originally... works, feels hack.

you can try this: http://www.arpitonline.com/blog/2008/06/17/debugging-crossdomain-issues-following-http-302s/


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -