tags:

views:

390

answers:

2

Hi guys.

Dose anyone knows why I have to use -use-network=false in my Flex Builder?!?!?!

This is set inside the Project Properties and is Additional compiler argument.

This is only when I want to read in a external file like XML.

Others in my team doesn't have to have -use-network=false ????

A: 

Network access and local file access are mutually exclusive in Flash/Flex. The documentation for the use-network compiler option explains it best:

When the use-network property is set to false, the application can access the local filesystem (for example, use the XML.load() method with file: URLs) but not network services. In most circumstances, the value of this property should be true.

For more information about the use-network property, see Applying Flex Security.

Richard Szalay
I see. But will my application work once I deploy it on a remote server then?
dejaninic
Once it's on the remote system, having `use-network` set to true will mean that it can access the user's machine, but not any files on the server on which it's hosted.
Richard Szalay
A: 

If other members of your team don't have to use -use-network=false then they probably have global trust permisions set up. You can't access local files with a Flash file ordinarily, for good security reasons. When you're developing though you need to be able to access files locally. To do that, you have two options:

  1. -use-network=false inverts the trust, but on deploying you have to revert it back;
  2. set global permissions so that within your dev folder, these rules don't apply: see this post for details
alecmce