質問

Our app is making frequent URL requests to another domain which are not dependent on the app to function normally. Occasionally, for some reason it fails to download the crossdomain.xml from the remote domain, which results in the app throwing a sandbox security violation.

As these URL requests are not required for the app to function normally, I would much rather capture and ignore the security sandbox violations and keep the app running. Is this possible?

役に立ちましたか?

解決

Have a look at SecurityErrorEvent.SECURITY_ERROR, which is dispatched by URLLoader.

To answer your comment:

Yes, the cross domain file isn't actually looked for until you request data:

Note that even though the method name is loadPolicyFile(), the file isn't actually loaded until a network request that requires a policy file is made.

Source: loadPolicyFile()

Meaning you can use the above event to manage failed loads.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top