Specifications
33ADOBE FLEX 3
Building and Deploying Adobe Flex 3 Applications
About sandboxes
The sandbox type indicates the type of security zone in which the SWF file is operating. In Flash Player, all SWF
files (and HTML files, for the purposes of SWF-to-HTML scripting) are placed into one of four types of sandbox:
remote All files from non-local URLs are placed in a remote sandbox. There are many such sandboxes, one for
each Internet (or intranet) domain from which files are loaded.
local-with-filesystem The default sandbox for local files. SWF files in this sandbox may not contact the Internet
(or any servers) in any way—they may not access network endpoints with addresses such as HTTP URLs.
local-with-networking SWF file in this sandbox may communicate over the network but may not read from local
file systems.
local-trusted This sandbox is not restricted. Any local file can be placed in this sandbox if given authorization by
the end user. This authorization can come in two forms: interactively through the Settings Manager or noninter-
actively through an executable installer that creates Flash Player configuration files on the user’s computer.
You can determine the current sandbox type by using the
sandboxType property of the Security class, as the
following example shows:
<?xml version="1.0" encoding="utf-8"?>
<!-- security/DetectCurrentSandbox.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initApp()">
<mx:Script><![CDATA[
[Bindable]
private var l_sandboxType:String;
private function initApp():void {
l_sandboxType = String(Security.sandboxType);
}
]]></mx:Script>
<mx:Form>
<mx:FormItem id="fi1" label="Security.sandboxType">
<mx:Label id="l1" text="{l_sandboxType}"/>
</mx:FormItem>
</mx:Form>
</mx:Application>
When you compile a Flex application, you have some control over which sandbox the application is in. This deter-
mination is a combination of the value of the
use-network compiler option (the default is true) and whether the
SWF file was loaded by the client over a network connection or as a local file.










