By default, the Image/SWFLoader should not be setting the loaderContext's 
securityDomain.  If trustContent=true it will and will cause this problem.  If 
you supplied a custom loaderContext, you could also have this problem.  I would 
try to find out how the loaderContext is getting set.

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ward 
Loockx
Sent: Friday, November 21, 2008 12:03 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Security sandbox violation: local SWF files 
cannot use the LoaderContext.securityDomain property


Alex Harui schreef:
>
> Please post the entire contents of the window that shows the
> exception. I would expect to see a call stack with line numbers if you
> are using a debug build
>
> -----Original Message-----
> From: flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com> 
> <mailto:flexcoders%40yahoogroups.com>
> [mailto:flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>] On Behalf Of Ward Loockx
> Sent: Thursday, November 20, 2008 8:30 AM
> To: flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com> 
> <mailto:flexcoders%40yahoogroups.com>
> Subject: Re: [flexcoders] Re: Security sandbox violation: local SWF
> files cannot use the LoaderContext.securityDomain property
>
> Alex Harui schreef:
> >
> > First you have to identify which code is causing the violation. Post
> > the entire violation. It should contain more information about which
> > component is doing the violation. Once you figure that out, then you
> > can try to workaround it, but testing from the server instead of the
> > local filesystem is recommended as someday you will deploy the app to
> > a server and you'll have different security rules in such a
> configuration.
> >
> > A workaround if a SWFLoader has trustContent=true
> >
> > <SWFLoader id="ldr" trustContent="true" />
> >
> > Is
> >
> > <SWFLOader id="ldr" preinitialize="if (Security.sandboxType=='remote')
> > ldr.trustContent=true else ldr.trustContent=false" />
> >
> > *From:* flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> [mailto:flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com> 
> <mailto:flexcoders%40yahoogroups.com>]
> > *On Behalf Of *Ward Loockx
> > *Sent:* Tuesday, November 18, 2008 12:06 AM
> > *To:* flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com> 
> > <mailto:flexcoders%40yahoogroups.com>
> > *Subject:* Re: [flexcoders] Re: Security sandbox violation: local SWF
> > files cannot use the LoaderContext.securityDomain property
> >
> > Alex Harui schreef:
> > >
> > > Some code somewhere is trying to set a SecurityDomain parameter in a
> > > LoaderContext. There are parameters like trustContent on SWFLoader
> > > that can trigger that code. Unfortunately you can only run such code
> > > when deployed to HTTP:// and not from FILE:://. You might need to put
> > > in some conditional code to deal with it
> > >
> > >
> > >
> > > *From:* flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > <mailto:flexcoders%40yahoogroups.com>
> > [mailto:flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>]
> > > *On Behalf Of *Ward Loockx
> > > *Sent:* Monday, November 17, 2008 9:07 AM
> > > *To:* flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > > *Subject:* Re: [flexcoders] Re: Security sandbox violation: local SWF
> > > files cannot use the LoaderContext.securityDomain property
> > >
> > >
> > >
> > > valdhor schreef:
> > > >
> > > > Try adding your bin-debug directory to your Global Security Settings
> > > > Manager
> > > >
> > >
> >
> (http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
> <http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html>
> >
> <http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
> <http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html>>
> >
> > >
> >
> <http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
> <http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html>
> >
> <http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
> <http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html>>>
> >
> > >
> > > >
> > >
> >
> <http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
> <http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html>
> >
> <http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
> <http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html>>
> >
> > >
> >
> <http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
> <http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html>
> >
> <http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
> <http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html>>>>)
> > > >
> > > > --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > <mailto:flexcoders%40yahoogroups.com>
> > <mailto:flexcoders%40yahoogroups.com>
> > > > <mailto:flexcoders%40yahoogroups.com>, Ward Loockx <[EMAIL PROTECTED]> 
> > > > wrote:
> > > > >
> > > > > Hello,
> > > > >
> > > > > When I'm trying to load images from a remote server I get the
> > > following
> > > > > error message..
> > > > >
> > > > > *Security sandbox violation: local SWF files cannot use the
> > > > > LoaderContext.securityDomain property*
> > > > >
> > > > > I've been googling and nothing that works for me. When I put the
> > > swf on
> > > > > the remote server it loads the images perfect! I've tried
> everything
> > > > > (Crossdomain,addSecuritydomain on application, ...).
> > > > > Someone that managed to solve this ? Looks like a lot of
> people have
> > > > > this problem...
> > > > >
> > > > > Thanks!
> > > > > Ward
> > > > >
> > > >
> > > >
> > > I added the SWF, but that didn't worked out :(
> > >
> > >
> > Hello,
> >
> > Thanks for the reply. If I get it right, there is a workaround but
> > requires additional code? Can you specify a bit please ?
> >
> > Thanks,
> > Ward
> >
> >
>
> I've been trying with trustcontent
>
> <mx:Image id="image" source="{imageUrl}" trustContent="true"/>
>
> But this didn't worked out for me... still same error.
>
> Any suggestions?
>
> ------------------------------------
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt>
> Alternative FAQ location:
> https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
> <https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847>
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo
> <http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo>!
> Groups Links
>
>

SecurityError: Error #2142: Security sandbox violation: local SWF files
cannot use the LoaderContext.securityDomain property.
file:///C:/Users/Ward/Documents/Flex<file:///C:\Users\Ward\Documents\Flex> 
Builder
3/myProject/bin-debug/VisitorApplication.swf was attempting to load
http://cams.enjoy.be/preview/c0030_webcam.jpg.
at flash.display::Loader/_load()
at flash.display::Loader/load()
at
mx.controls::SWFLoader/loadContent()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\SWFLoader.as:1362]
at
mx.controls::SWFLoader/load()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\SWFLoader.as:1211]
at
mx.controls::SWFLoader/commitProperties()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\SWFLoader.as:1015]
at
mx.core::UIComponent/validateProperties()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\core\UIComponent.as:5749]
at
mx.managers::LayoutManager/validateProperties()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:522]
at
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:672]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8565]
at
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8508]

This happens when I set the source of the Image to an url (Actionscript)..

Thanks!

Reply via email to