July 2008 Archives

When you create a new Flex or ActionScript project in Flex Builder you are immediately able to access local files (config XML, etc) and internet resources at the same time.

But if you decide to import a project, or move or rename your current project suddenly you're prompted with the dreaded Security Sandbox Violation: Security Error: Error #2148.

I've had this happen in the past, but often I was just loading a local XML file and I would just add -use-network=false as a compiler argument and all would be happy.

This however will then prevent you from accessing resources from the internet presenting you with yet another Security Sandbox Violation: Security Error: Error #2028. Not a great solution.

Lo and behold, Jesse Warden has the fix.

But to quickly recap, when Flex Builder creates a new project, it adds a new line item to two files giving permission to the new project's bin directory to access both local and internet resources.

Here is the location of the two files (flexbuilder.cfg and flexbuilder.fbr):

PC:
C:\Documents and Settings\[username]\Application Data\Macromedia\Flash Player\#Security\FlashPlayerTrust

Mac:
[user]:Library:Preferences:Macromedia:Flash Player:#Security:FlashPlayerTrust

Now just add a new line item to each file (copying the one above if necessary) and change the paths to match your project's bin or bin-debug directory.

Done.

December 2008

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Categories

Archives