[Top][All Lists]

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

Re: [Swftools-common] pdf2swf and AIR

From: Hans J Nuecke
Subject: Re: [Swftools-common] pdf2swf and AIR
Date: Thu, 17 May 2012 23:30:18 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1

For future use of pdf2swf for AIR applications it would be necessary to have the option to get rid of the allowDomain command.
Otherwise no converted PDF file could be used with an AIR application.

One option could be a switch, as suggested by Andrew.
Another option could be a "try-catch" block, coded directly into the AS3 code generated by swftools. Which would handle both the Flashplayer/network and AIR/local use case automatically (if my assumption is right).

ImO this should be realized by the developers. They know best how to create such AS3 binary code; and can build the Binaries more easily (assumption based on my problems trying to compile ;-)

Matthias, what do you think about this?
Do you have other ideas/suggestions/a work around?


Am 07.05.2012 18:05, schrieb Andrew Sinning:

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!



SWFTools-common is a self-managed list. To subscribe/unsubscribe, or amend an existing subscription, please kindly point your favourite web browser at:<http://lists.nongnu.org/mailman/listinfo/swftools-common>



Hans J. Nuecke / Gorch-Fock-Str. 6 • 81827 Muenchen • Germany / VservU GmbH
Home:                           +49 (89) 45344858              office:           +49 (89) 43906 707
mobile:                        +49 (173) 5392957              Skype:                              hnuecke
private:                       address@hidden                 business:            address@hidden
website:                    www.megazine3.de
Munich HRB 181251    Geschäftsführer:      Hans J. Nücke      USt-Id:   DE266694113

reply via email to

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