Security Sandbox Violation in Flex

I’m trying to access an mp3’s id3 tags… I keep getting an error when I run try to load any specific mp3. SecurityError: Error #2122: Security sandbox violation Sound.id3


On the start of my application I have a init() function that gets executed on creationComplete. I utilize this function to setup all of my listeners, and request of initial data.

The fix is:


import flash.system.Security; public function init():void{



I happen to own the domain that I am requesting my mp3’s from, so I also control that crossdomain.xml file, so I want any site to be able to access this domain, so I created my crossdomain.xml file in my web root.

It looks like this:

<?xml version=“1.0”?>


<allow-access-from domain=“*” />


I tried quite a few different combo’s, I had thought originally that if a crossdomain.xml file existed on the server you were requesting data from that it would automatically be picked up by the flash player… most of the documentation that I found stated this to be the way it worked, but in my situation, it was untrue…

Now I am also aware that by declaring in my crossdomain.xml file “allow-access-from domain=”*”” means that any other domain could access it… but I could restrict that by declaring the file like so:

<?xml version=“1.0”?>


<allow-access-from domain=“*” />


</code> That would also allow my domain “” to access the file.

5 comments on this post.
  1. Tagôre Cauê:


    Muito obrigado, estava com este problema no trabalho e consegui resolver.

  2. win:

    Thanks!!! I had done everything, but didn’t know where to put the loadPolicyFile.
    It really helped me out!!!

  3. Drew:

    Creating crossdomain.xml in my webroot solved the issue I was having – thanks for this post!

  4. II:

    If this fix doesn’t work and you just want to get the error to go away, check this out:

  5. Eşref Atak:

    You must create a crossdomain.xml file. Solution is here:

Leave a comment