I don't have the exact answer, but in my model of the world, swfs from
the file system don't have a domain so there's no way to check the
crossdomain and allow sandbox importing.

 

Once you are in the web tier, you do have a domain name and
crossdomain.xml takes effect.  If the sub-swf is a Flex swf, it will try
to ask its parent questions.  By getting the crossdomain.xml correct and
loading into the same security domain it should work.  Flex does not
currently support loading other Flex apps into separate security
domains.

 

-Alex

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of ivansebastiansurya
Sent: Monday, May 21, 2007 12:00 AM
To: [email protected]
Subject: [flexcoders] Re: Secuity sandbox violation when SwfLoader is
used to load swf file from a URL

 

Thanks for your reply first of all ;)
So, what's the sandbox rules when the main app is launched from a 
web server then? I think the illegal access is when the sub 
application (loaded swf) tried to access the parent swf. The funny 
thing is, I don't have any code in my sub application where I 
request access to the parent application.
Thanks for your time. It's greatly appreciated.

Ivan. 

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> The sandbox rules when the main app is launched from the file 
system is
> different than when the main app is launched from a web server.
> 
> 
> 
> -Alex
> 
> 
> 
> ________________________________
> 
> From: [email protected] <mailto:flexcoders%40yahoogroups.com>

[mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of ivansebastiansurya
> Sent: Sunday, May 20, 2007 9:35 PM
> To: [email protected] <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] Secuity sandbox violation when SwfLoader is 
used
> to load swf file from a URL
> 
> 
> 
> Hi everyone,
> 
> I wrote an application that has an SWFLoader to load another swf 
> movie/application into the main application.
> 
> The server where my sub application is served from already has the 
> crossdomain.xml, letting any domain to access data from it.
> 
> However, I got the following error message:
> SecurityError: Error #2047: Security sandbox violation: parent: 
> http://submovie.swf <http://submovie.swf>  <http://submovie.swf
<http://submovie.swf> > cannot access
> file:///C:/Documents <file:///C:\Documents>  <file:///C:\Documents>
and 
> Settings/IvanS/My Documents/Flex Builder 2/parentApp.swf.
> at flash.display::DisplayObject/get parent()
> at mx.managers::SystemManager/::executeCallbacks()
> at mx.managers::SystemManager/::docFrameHandler()
> 
> Does anyone have any idea how to handle this?
> Thanks,
> 
> Ivan.
>

 

Reply via email to