views:

46

answers:

2

How to I get my security policy working? My parent swf parses an XML doc and loads 2 children. It throws a 2148 security error, and only works in the Flash IDE.

PARENT SWF 'I put it at the top of my code. That seemed like the proper event flow'

flash.system.Security.loadPolicyFile("crossdomain.xml");

I've referenced my security file from my swf. I Also published my parent swf as 'network only' and put all the crossdomain.xml and everything else in the same folder. I need to click on the animations and have them place from a local computer at a kiosk. Any suggestions?

POLICY FILE 'Used"*" since there's not URL, it's all local'

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"&gt;
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all" />
<allow-access-from domain="172.16.8.24" />
</cross-domain-policy>
+1  A: 

Try altering your crossdomain like the following to see if it can get access

<site-control permitted-cross-domain-policies="all"/>
Jason W
@Jason, I tried that, but no luck.
VideoDnd
@VideoDnd, that just sucks -- the crossdomain looks ok to me (without knowing your server setup). The only other thing I would try, just for testing, is to not load the children SWFs right away. Setup a button or something you can trigger the load from after waiting a minute after the parent SWF loads. That would ensure that the policy is fully loaded prior to the children and rule that out as an issue.
Jason W
@Jason, thanks. I commented out addChild to isolate that, but it still fails. The policy may load too slow. Thanks.
VideoDnd
A: 

This is not brilliant, but it worked. Thanks for helping me isolate the problem.

I noticed my parent swf worked with some children and not others, so I tried slowing them down by adding mp3 file, and it worked! Also, I eliminated all security, since I really don't need it to play files locally.

I try these two things
• Set Publishing to 'Access local files only'
• Import mp3 file into each child swf to slow it down

Note
I also had to eliminate fl.transitions. Being careful about event flow and putting my code in the right order didn't help.

VideoDnd
Glad to see you got it working
Jason W