About the sandboxType property

For Flash Player 8 and later, the System.security.sandboxType property returns the type of security sandbox in which the calling SWF file is operating.

The sandboxType property has one of the four following values:

remote The SWF file is hosted on the Internet and operates under domain-based sandbox rules.

localTrusted The SWF file is a local file that has been trusted by the user, using either the Global Security Settings Manager or a FlashPlayerTrust configuration file. The SWF file can both read from local data sources and communicate with the network (such as the Internet).

localWithFile The SWF file is a local file that has not been trusted by the user, and was not published with a networking designation. The SWF file can read from local data sources but cannot communicate with the network (such as the Internet).

localWithNetwork The SWF file is a local file that has not been trusted by the user, and was published with Access Network Only selected in the Publish Settings dialog box (Flash tab). The SWF file can communicate with the network but cannot read from local data sources.

You can check the sandboxType property from any SWF file, although a value is returned only in files published for Flash Player 8 and later. This means that when you publish for Flash Player 7 or earlier, you do not know whether the sandboxType property is supported at runtime. If the property isn't supported at runtime, the value is undefined, which occurs when the Flash Player version (indicated by the System.capabilities.version property) is less than 8. If the value is undefined, you can determine the sandbox type according to whether your SWF file's URL is a local file or not. If the SWF file is a local file, Flash Player classifies your SWF as localTrusted (which is how all local content was treated prior to Flash Player 8); otherwise Flash Player classifies the SWF file as remote.