swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] Error #2044: Unhandled securityError:. text=Error


From: filip sound
Subject: Re: [Swftools-common] Error #2044: Unhandled securityError:. text=Error #2140: Security sandbox violation
Date: Wed, 29 Jul 2009 16:34:09 +0200

hi,

have you set the local-with-network priviledge for your generated swf files? do you generate flash9 swfs? the switch is -T9

also, when you're loading those swf you have to make sure you use a SecurityContext for your Loader call (AS3):
yourLoaderObject.load(new URLRequest(url), new LoaderContext(false, ApplicationDomain.currentDomain, SecurityDomain.currentDomain));

make sure you're familiar with the security-model of flash.
you'll find a tool on the internet (from adobe) called LocalContentUpdater which solves your problem.

the swf files pdf2swf generates have this flag set wrong for your application.

example usage (from php):
// using the content updater from adobe to remove the network priviledges from the swf file
echo "Conversion succeeded, removing network privileges ...\n";
system("....../LocalContentUpdater/LocalContentUpdater -x '".$swfFilePath."'");

easy and free to use.
http://www.adobe.com/support/flashplayer/downloads.html#lcu

alternatively you can use matthias' (swftools developer) solution:

Both swfcombine and as3compile support the following options:
   -N,  --local-with-network
   -L,  --local-with-filesystem
.
To postprocess a file to be "local with filesystem", do a
   swfcombine -d -L file.swf -o file.swf


to explain your problem: you're trying to use flash9 swf files that have "network-only" priviledges set which means that you can not use them locally. with the tool from adobe or the tools from matthias you are able to remove the priviledges.

bye,
  filip


On Wed, Jul 29, 2009 at 4:17 PM, Rahul Mahurkar <address@hidden> wrote:
Hi
 
In my project, I've a shell (a flex application) that loads couple of SWFs, which are generated using PDF2SWF. When I run the application locally (as a standalone application) I get the following error -
Error #2044: Unhandled securityError:. text=Error #2140: Security sandbox violation: file:///C|/dist/book.swf cannot load file:///C|/dist/assets/swf/PRJ3_Anth_Exp3_F.swf. Local-with-filesystem and local-with-networking SWF files cannot load each other.
 
I've compilied my Flex application (shell i.e. book.swf) with -use-network=false option, so the applicaiton is Local-with-filesystem.
 
I assume the issue is with the SWF which are generated using PDF2SWF. Any idea how I can make them Local-with-filesystem as well? OR Is there anyother approach/solution that can help me in resolving this issue?
 
Thanks in advance.
 
-Rahul


reply via email to

[Prev in Thread] Current Thread [Next in Thread]