Friday, April 10, 2009

Security Sandbox Violations

I ran into a Security Sandbox Violation using a URLLoader today. The .SWF is on my development computer, and I was trying to access a text file on the same computer, in the same folder as the SWF.

The text file that I'm trying to load contains a list of 5-letter words that will be used in a game dictionary. After looking for information I found the following link:

Configure Your Flash Player


This link takes you to the actual Adobe Flash Player Settings Manager for your locally installed Flash player. I clicked on the 3rd tab for Global Security Settings, then Add Location, and finally "Browse For Folder".



Choosing the folder public\bin and adding it has solved the problem. My Flex app is now finding the dictionary file and allowing the SWF to access it.

Note: When I chose Browse for File and selected the SWF, I was able to get to the text file, but I got another sandbox violation when the SWF's HTML file tried to access it. Using Browse for Folder solved that problem as well.

No comments:

Post a Comment