18 Replies Latest reply: Oct 20, 2011 8:11 AM by tamborphic RSS

    How to run swf's using Proscenium

    beau@ambur.com Community Member

      I've followed the directions and downloaded Flash Builder along with the sample code. I've been able to compile the applications to swf files, however I can't get them to run. The instructions say to download the player from http://www.adobe.com/support/flashplayer/downloads.html however, those are all 10.x, and when using the Desktop player I get errors about not being able to call native functions, and when I try running in a browser with Flash Player 11 the movie does not load or run.

       

      I'm using Windows 7 64-Bit.

       

      What is the minimum player version required to run the demo's, and is there a Flash 11 Debug Desktop Player that can be used instead of running thru a browser?

       

      The exact error I'm getting in the Desktop Player is:

      "VerifyError: Error #1079: Native methods are not allowed in loaded code."

       

      In a web browser with Flash Player 10.x or 11.x when I right-click I get:

      "Movie not loaded..."

        • 1. Re: How to run swf's using Proscenium
          马鉴 Community Member

          I think you should change the "playerglobal.swc" link type to "external".

          • 2. Re: How to run swf's using Proscenium
            DrAlexGor Community Member

            Did you follow these instructions -> http://labs.adobe.com/wiki/index.php/Proscenium ?

             

            FYI, Flash Player 11 was posted yesterday at 21:00 that might work better for you

            • 3. Re: How to run swf's using Proscenium
              Phillip R. Cargo Community Member

              Same problem, compiles fine (both the Flex and AS examples) but I cannot run the SWF. Windows 7 64-bit, FlashBuilder 4.5, Flex SDK 4.5.1, using flashplayer_11_sa_debug_32bit.exe player. Hmmmmmmmm ....

               

              VerifyError: Error #1079: Native methods are not allowed in loaded code.

              • 4. Re: How to run swf's using Proscenium
                DrAlexGor Community Member

                Sounds like slightly different problem than what I saw ( Context not available error ), but I saw a black screen until I set the following in my html:

                params.wmode = "direct";

                • 5. Re: How to run swf's using Proscenium
                  Razukrashka Community Member

                  me2.

                   

                  follow instructions - http://labs.adobe.com/wiki/index.php/Proscenium

                  without using pixelbender.

                   

                  return error - VerifyError: Error #1079: В загруженных кодах собственные методы не разрешены .

                   

                  Windows 7 64-bit, FlashBuilder 4.5, Flex SDK 4.5.1

                  • 6. Re: How to run swf's using Proscenium
                    Grayson Lang Community Member

                    If you check the Flash Player download page, version 11 is now available:

                    http://www.adobe.com/support/flashplayer/downloads.html#fp11

                     

                    Proscenium relies upon having the new Stage3D APIs, so you have to minimally be using the most recent beta build of Flash Player 11, though the release build should work.

                     

                    As DrAlexGor mentions, it is necessary to set the "wmode" parameter in the HTML page to "direct" for Stage3D to function correctly in the browser.

                     

                    I would really like to help you resolve this problem. Let me know if you have already found a workaround.

                     

                    If not, can you send me a zipped up copy of the content you are having trouble with so that I can debug it from my side.

                     

                    Thanks,

                    Grayson

                    • 7. Re: How to run swf's using Proscenium
                      beau@ambur.com Community Member

                      So the initial problem was that the updated Flash Player 11 files were not posted at the time the Proscenium libraries were originally posted. Now that they are I've downloaded the newer SWC and Players, re-compiled and am still having the same issue. I saw the note about wmode, however I'm getting the same "Native methods are not allowed in loaded code." error using the Stand Alone Adobe Flash Player 11.0 r1 run-time for Windows (11.0.1.152 to be exact).

                      • 8. Re: How to run swf's using Proscenium
                        Ethan.Du Community Member

                        It works.Thanks!

                        • 9. Re: How to run swf's using Proscenium
                          alexanderdehaas Community Member

                          @beau@ambur.com I'm having the same issue, anybody has some input on this one?

                          • 10. Re: How to run swf's using Proscenium
                            Grayson Lang Community Member

                            The first response is the correct one. The "Link type" of playerglobal.swc needs to be changed to "external"..

                             

                            Context-click on the project and select "Properties".

                             

                            Select the "ActionScript Build Path" pane.

                             

                            Under "Build path libraries", select the entry for "${PLAYERGLOBAL}"

                             

                            Click on the disclosure triangle to the entriy's left to expand its properties.

                             

                            Double click on "Link Type: Merged into code".

                             

                            From the "Link Type" drop down menu, select "External"

                             

                            Click OK

                             

                            Click OK

                            • 11. Re: How to run swf's using Proscenium
                              Phillip R. Cargo Community Member

                              Thank You Grayson!

                               

                              That worked great for the ActionScript samples (ProsceniumSamples)!!!! Not so for the Flex sample (ProsceniumSamplesFlex), the same error pops up: "VerifyError: Error #1079: Native methods are not allowed in loaded code."

                              • 12. Re: How to run swf's using Proscenium
                                Grayson Lang Community Member

                                I've figured out a better workaround and will be updating the drop and build instructions soon.

                                 

                                (In the Windows Explorer or OS X Finder)

                                 

                                Within the flex sdk 4.5.1 folder, here:

                                [Windows XP and 32-bit Vista/7]

                                C:\Program Files\Adobe\Adobe Flash Builder 4.5\sdks\4.5.1\frameworks\libs\player\

                                 

                                [Windows 64-bit Vista/7]

                                C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\4.5.1\frameworks\libs\player\

                                 

                                [OS X Default]

                                /Applications/Adobe Flash Builder 4.5/sdks/4.5.1/frameworks/libs/player/

                                 

                                make a folder named "11.0", so you end up with:

                                .../sdks/4.5.1/frameworks/libs/player/11.0/

                                 

                                place the "playerglobal11_0.swc" in that folder and the rename it to "playerglobal.swc"

                                 

                                (Inside Flash Builder)

                                 

                                Context-click on the project and select "Properties".

                                 

                                Select the "ActionScript Build Path" pane.

                                 

                                Under "Build path libraries", select the entry for "${PLAYERGLOBAL}" if it exists and then the "Remove" button.

                                 

                                Select the "Flex Compiler" pane.

                                 

                                In the "Additional Compiler Arguments" text box add:

                                -target-player=11

                                 

                                To refresh the entire contents of the Flex SDK components choose "Use a specfic SDK" and then switch to a different SDK than 4.5.1 and click the "Apply Button"

                                then switch it back to 4.5.1 in that combo box, or to "Use Default SDK" if your default is 4.5.1

                                 

                                Click "OK"

                                • 13. Re: How to run swf's using Proscenium
                                  beau@ambur.com Community Member

                                  I'm attempting this process and noticed a couple things. Where you say "Flex Compiler" pane, for me it shows up as "ActionScript Compiler" pane, and the "-target-player=11" was already set, and I got an error when I added it again, and so removed that one and just left the one already there. Also when I tried using another specific sdk, I got an error that other arguments where unvalid, and so I specified Flex 4.5 as the other version hit apply, and then went back to 4.5.1 and said ok and everything seemed fine. Then I went to clean the project and got a bunch of errors, all the same error...

                                   

                                  DescriptionResourcePathLocationType
                                  configuration variable 'compiler.library-path' value contains unknown token 'PLAYERGLOBAL'ProsceniumTutorials
                                  UnknownFlex Problem

                                   

                                  So now I'm trying to figure out if I need to add that back in.

                                   

                                  ...Just fiddled with this some more and found that some of the settings seem to still require closing/opening Flash Builder?

                                   

                                  Select the "Flex Compiler" pane.

                                   

                                  In the "Additional Compiler Arguments" text box add:

                                  -target-player=11

                                   

                                  To refresh the entire contents of the Flex SDK components choose "Use a specfic SDK" and then switch to a different SDK than 4.5.1 and click the "Apply Button"

                                  then switch it back to 4.5.1 in that combo box, or to "Use Default SDK" if your default is 4.5.1

                                   

                                  Click "OK"

                                   

                                   

                                  P.S. This would be a WHOLE lot easier if there was 4.5.2 version of the Flash Builder that installed with the Flash 11 player, etc, etc.

                                   

                                  Also why aren't there instructions and sample FLA's for using proscenium with Flash Professional?

                                  • 14. Re: How to run swf's using Proscenium
                                    Grayson Lang Community Member

                                    Yes, sorry, it should be "ActionScript Compiler" pane.

                                     

                                    That error looks like you still need to remove the ${PLAYERGLOBAL} entry from the "ActionScript Build Path" pane, under "Build path libraries".

                                     

                                    And yes, if there had been a concurrently shipped version of the Flex SDK 4.5.2 that contained the playerglobal.swc, all of this would be much easier.

                                     

                                    I guess this is the cost of staying current ; )

                                    • 15. Re: How to run swf's using Proscenium
                                      beau@ambur.com Community Member

                                      SUCCESS, this finally worked thru a combination of the above the steps and original install instructions, the last step this time was going in to PLAYERGLOBAL and setting it to external.

                                       

                                      To recap the minimum steps to get the sample code to compile with Flex Builder 4.5.1....

                                       

                                       

                                      • 16. Re: How to run swf's using Proscenium
                                        Jack Zhang Community Member

                                        Thank for you solved my doubt.

                                        • 17. Re: How to run swf's using Proscenium
                                          tamborphic Community Member

                                          Me too - I've tried everything and still cant even get the already compiled swfs to run from the proscenium samples. Can anyone explain why using Flash player 11 standalone to directly open the already compiled swf samples still results in  the "Native methods...in loaded code" error.

                                           

                                          It seems to me like these sample swfs should work without having to do all these fixes.

                                          • 18. Re: How to run swf's using Proscenium
                                            tamborphic Community Member

                                            Yep - this one worked for me - thanks