# How to tell if loadPolicyFile succeeded?

**URL:** <https://forum.kirupa.com/t/how-to-tell-if-loadpolicyfile-succeeded/266228>\
**Category:** Uncategorized\
**Created:** [July 17, 2008, 1:24pm UTC](https://forum.kirupa.com/t/how-to-tell-if-loadpolicyfile-succeeded/266228 "2008-07-17T13:24:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RichSad](https://avatars.discourse-cdn.com/v4/letter/r/df788c/32.png) [@RichSad](https://forum.kirupa.com/u/RichSad)\
**Post date:** [July 17, 2008, 1:24pm UTC](https://forum.kirupa.com/t/how-to-tell-if-loadpolicyfile-succeeded/266228/1 "2008-07-17T13:24:40Z")

</div>

Hi all, I am confused by ActionScript 3’s loadPolicyFile function. It returns void, so how can I tell whether the request was successful?

Why do I care? I want to first request the policy file on the default port 843, then try other ports eventually landing on port 80. This is how Flash Media Server does it. I want to mimic that behavior. I need to know if a call to loadPolicyFile fails so I know to try the next port in the sequence.

Also, assuming the request for a policy file successfully retrieved the policy file, how do I know whether it granted access to the port I want to open? I presume I could just try to open the port and look for a security exception of some sort, but I am a noobie AS3 programmer and I have no idea how to trap such an exception.

All comments are welcome!
