[Top][All Lists]

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

Re: [Swftools-common] pdf2swf and AIR

From: Andrew Sinning
Subject: Re: [Swftools-common] pdf2swf and AIR
Date: Mon, 7 May 2012 11:05:42 -0500

Commenting out the offending lines below has fixed the problem.


I think it would be very beneficial to add an option to the command-line parameters to suppress the inclusion of Security.allowDomain(“*”).


From: Andrew Sinning [mailto:address@hidden
Sent: Sunday, May 06, 2012 6:10 PM
To: address@hidden
Subject: Re: [Swftools-common] pdf2swf and AIR


As near as I can tell, the relevant lines where the Security.allowDomain("*") gets inserted into the MainTimeline are in /lib/as3/script.c, starting on line 89:


    __ getlex(c, "[package]flash.system::Security");

    __ pushstring(c, "*");

    __ callpropvoid(c, "[package]::allowDomain", 1);


Unless somebody advises me otherwise, I will try commenting out these lines and recompiling.  I will do a test tomorrow to determine if this fixes the problem.


I will have to do this on my Fedora server where I have succeeded in getting swftools to compile.  The process for compiling on Windows looks to be way beyond me.



From: Andrew Sinning [mailto:address@hidden
To: address@hidden
Sent: Sun, 06 May 2012 15:05:24 -0500
Subject: [Swftools-common] pdf2swf and AIR

My apologies if this is a duplicate posting.  I have subcribed to the list and have set my preferences to receive my own messages, but after two days this hasn't shown up in my in box, so I will try again:

---- my message -->

For most of today and yesterday I have been trying to solve the problem of bringing a pdf2swf generated swf into an AIR application.  I have read this post, but I don’t believe that it answers the question:





The problem is that when the external swf (it doesn’t matter if the swf is on a remote server or is on the local file system) is loaded, there is immediately generated an error:


      “SecurityError: Error #3207: Application-sandbox content cannot access this feature.

            at flash.system::Security$/allowDomain()

            at p_fla::MainTimeline/frame1()”



Luca Agostini, the poster of the thread above, asserts:


      “I think the problem is this row in MainTimeline constructor:


      that is not supported in Adobe AIR.”



I have confirmed this with a test.  I made a simple Flash document with just a shape and single frame.  If I include:


      import flash.system.Security;



.. then the error is generated.


If I remove those two lines, then the error goes away.




I have read Filip's post carefully, and I have tried to follow his instructions:


      "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));"



There are a few problems with these instructions:


1) Trying to set the securityDomain of the LoaderContext to SecurityDomain.currentDomain will throw up an error "Error:Error #2114: Parameter LoaderContext.securityDomain must be null." 


2) It is confusing that Filip is asking "have you set the local-with-network priviledge for your generated swf files?"  It’s not clear to me where this gets set.  The GUI tool Gpdf2swf supports this option, but I don't see a corresponding parameter for the command line tool.  I've tried creating swfs using both options "Access Local Files" and "Access Network Files" in the Flash IDE Publish Settings, but neither options corrects the error.




I really think that Luca got it right when he asked:


      MainTimeline constructor:


      that is not supported in Adobe AIR.


      It's possible to modify the constructor or delete this feauture?



I have no idea how to modify the source files, yet alone compile them.  I would really love to try testing a version with the allowDomain command turned off.


Thank you so much!



reply via email to

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