Ok, so the main AIR application is loaded into the application sandbox.
We are loading "modules" from the app-storage directory into the application. 
(these are not Flex modules, but SWFs with our specific sandbox bridge)

A local SWF loaded into the application will reside in the local-trusted, 
local-with-file, or local-with-network security sandbox, 
as the documentation states here:

http://help.adobe.com/en_US/AIR/1.5/devappsflash/WS5b3ccc516d4fbf351e63e3d118666ade46-7f05.html#WS5b3ccc516d4fbf351e63e3d118666ade46-7e3c

In the first case the user needs to explicitly trust the SWF through the Global 
Security Manager. (which btw doesn't work for me, later on this.)

The second and third case are depending on how the SWF was compiled, with 
network access, or without it. (use-network flag)

I want to use the local-with-network sandbox, so I set use-network=true as the 
compiler option.

But the SWF is always loaded into the local-with-file sandbox, and I can't 
imagine why. This is our problem.

I also tried the desktop directory to load SWFs from and it worked as expected.


I hope this clear things up. And thanks for your time.

Daniel


Sidenote:
>From what I see I guess there's a problem with URI schemes. App storage 
>directory has it's own URI scheme (app-storage:/). Try allow something from 
>there in the Global Security Settings panel. It won't work. The manager will 
>offer an url somenthing like this: "app-storage:/module.swf", but in which AIR 
>application's app-storage directory is that SWF you are allowing anyway?
On the other hand using the File.desktopDirectory is working as expected, it is 
resolved with the file URI scheme (file://).








--- In flexcoders@yahoogroups.com, Alex Harui <aha...@...> wrote:
>
> I think we need a better explanation.  AIR apps usually have an "application" 
> sandbox type, not localXXX
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of daniel.langh
> Sent: Monday, July 27, 2009 3:49 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Loading local SWFs in AIR to local-with-network sandbox
> 
> 
> 
> Hello,
> 
> I'm trying to load locally stored SWF files from the app-storage directory of 
> my AIR application into the local-with-network security sandbox.
> Two SWFs are created with -use-network=true and use-network=false compiler 
> flags respectively.
> However both of them are loaded into the _local-with-file_ security sandbox, 
> regardless of the above mentioned compiler flag.
> I'm using the default LoaderContext.
> 
> Can anybody confirm this as a bug, or suggest a proper way to get things in 
> the local-with-network sandbox?
> 
> Thanks, Daniel
>


Reply via email to