This problem only occurred when the swf was embedded in Facebook, tests on other servers did not produce this error.
To fix this problem I did the following:
- Set Securtiy.allowDomain("foo.com"); in the document class
- I also specifically set the policy file with Security.loadPolicyFile("http://www.foo.com/crossdomain.xml");
- In crossdomain.xml, add the to-ports attribute:
<allow-access-from domain="www.foo.com/" secure="false" to-ports="*" />
This removed all clicks, bleeps and squelchy noised from the audio. I guess it has something to do with Flash only granting access to ports 1024 and above by default. Specifying to-ports="*" presumably allowed access to all available ports below 1024 and the mp3 streamed without any problems.
This documentation helped: Security.loadPolicyFile()