7 Replies Latest reply on Feb 16, 2016 12:59 AM by Nipun Asthana

    Publish interactive OAM?

    Pete47

      Hello. Using Animate CC to produce an interactive OAM package for use with Adobe Captivate 9.

       

      My movie works fine while testing but when I attempt to publish the OAM file, I get a series of compile errors stating:

       

      "1061: Call to a possibly undefined method bind through a reference with static type Function."

       

      My code looks like this:

       

      this.StopPlanet.addEventListener("click", fl_MouseClickHandler.bind(this));

      function fl_MouseClickHandler()

      {

        this.Planet10.stop();

      }

       

      this.PlayPlanet.addEventListener("click", fl_MouseClickHandler_2.bind(this));

      function fl_MouseClickHandler_2()

      {

        this.Planet10.play();

      }

       

      this.PlayMoon.addEventListener("click", fl_MouseClickHandler_3.bind(this));

      function fl_MouseClickHandler_3()

      {

        this.Planet10.MovingBlackPlanet.OrbitingRedMoon.play();

      }

       

      this.StopMoon.addEventListener("click", fl_MouseClickHandler_4.bind(this));

      function fl_MouseClickHandler_4()

      {

        this.Planet10.MovingBlackPlanet.OrbitingRedMoon.stop();

      }

       

      All of this code is being produced with code snippets. Anyone know what I might be doing wrong?

       

      Thanks,

      Pete

        • 1. Re: Publish interactive OAM?
          dharmk Adobe Employee

          Is it possible for you to share the fla Pete? We can take a look at it. I have also sent a PM, if you do not want to share the file publicly.

           

          -Dharmendra

          • 2. Re: Publish interactive OAM?
            dharmk Adobe Employee

            We are able to reproduce the issue Pete, no need to send the sample file. For the time being you can use the workaround mentioned by Colin in AS3 vs JS, Please clarify?

            We will keep you updated on the issue, sorry for the inconvenience.

             

            -Dharmendra

            • 3. Re: Publish interactive OAM?
              dharmk Adobe Employee

              Hi Pete,

               

              The extra errors which are being reported while publishing OAM are false errors. Only those errors which are generated during test movie are the real ones. If Test movie is not showing any error, then just publish the OAM file and ignore any additional compiler errors. The published OAM is correct and should work fine. Let us know if you are facing any other issue, meanwhile we will fix the bug internally.

               

              -Dharmendra

              • 4. Re: Publish interactive OAM?
                Pete47 Level 1

                Hello Dharmendra,

                 

                Sorry that I wasn't able to respond immeditately to your interest in this posting. Something came up (bedtime). Thank you for updating this posting as your findings progressed. I would have been happy to share my test file, publicly or privately.

                 

                I've attempted to publish to an OAM file again this morning, but as I thought, it fails and I don't know how to ignore the compiler errors that is preventing it from publishing.

                 

                Meanwhile, I will try the work around described by Colin and I will share the results as soon as I have some.

                 

                Pete

                • 5. Re: Publish interactive OAM?
                  Pete47 Level 1

                  Hello Dharmendra,

                   

                  With Colin's help, I've been successful in producing an OAM file that I can use with Captivate 8. Just to make this a complete thread, I'll repeat here, some of what I posed on the other discussion, and add a few notes about oddities I noticed in the publish process. Maybe they will help...

                   

                  My code now looks like this:

                   

                  var globalThis = this;

                  globalThis.StopPlanet.addEventListener("click", fl_MouseClickHandler);

                  function fl_MouseClickHandler()

                  {

                    globalThis.Planet10.stop();

                  }

                  globalThis.PlayPlanet.addEventListener("click", fl_MouseClickHandler_2);

                  function fl_MouseClickHandler_2()

                  {

                    globalThis.Planet10.play();

                  }

                  globalThis.PlayMoon.addEventListener("click", fl_MouseClickHandler_3);

                  function fl_MouseClickHandler_3()

                  {

                    globalThis.Planet10.MovingBlackPlanet.OrbitingRedMoon.play();

                  }

                  globalThis.StopMoon.addEventListener("click", fl_MouseClickHandler_4);

                  function fl_MouseClickHandler_4()

                  {

                    globalThis.Planet10.MovingBlackPlanet.OrbitingRedMoon.stop();

                  }

                   

                  Changing the format from what was in the code snippets to what you see above made a difference in the GUI and allowed me to publish.

                   

                  With the original code snippets in place, my Publish Settings dialog looked like this:

                  MyPublishSettingsDialog.png

                  As you know, I wasn't able to publish with that code because I couldn't ignore the compiler errors.

                   

                  With the code formatted as javascript, my Publish Settings dialog changed to look like this:

                   

                  MyPublishSettingsDialogWithJSCode.png

                  I don't know how the publish process was designed to work because this is my first attempt. But notice that I can't de-select the JavaScript/HTML check box. I also can't tell Animate where I want the OAM file to be published. With everything as you see above, when I publish, Animate produces the Javascript/HTML files in the location selected above. It took me a few moments to find the OAM file which I did find, in the same folder as the FLA file.

                   

                  The process feels a bit counter intuitive because I thought I should be able to specify the OAM location, and didn't expect to see anything for the Javascript/HTML output. In this case, I don't need and can't use the Javascript/HTML output.

                   

                  My goal is to produce interactive content published as an OAM file that I can use with Captivate. At the moment, I am able to do so, using Colins work around.

                   

                  Thank you for confirming there was a problem. I look forward to the fix because the code snippets are a great starting point. If you have any questions, please let me know. I hope this helps.

                   

                  Pete

                  • 6. Re: Publish interactive OAM?
                    dharmk Adobe Employee

                    Sorry about the inconvenience Pete, we have identified the problem and are working on a fix. We will share the updates soon regarding it.

                     

                    -Dharmendra

                    • 7. Re: Publish interactive OAM?
                      Nipun Asthana Adobe Employee

                      Peter Hoyt wrote:

                      My code now looks like this:

                       

                      var globalThis = this;

                      globalThis.StopPlanet.addEventListener("click", fl_MouseClickHandler);

                      function fl_MouseClickHandler()

                      {

                        globalThis.Planet10.stop();

                      }

                       

                      Hi Peter,

                       

                      If you're writing code on the main timeline of your project, you can also reference 'this' pointer as exportRoot (which is a global variable already defined). It's like the root of your entire project and all other symbols or graphics can be referenced as its children.

                      eg: exportRoot.SymbolName;     //references a symbol placed on main timeline.

                           exportRoot.getChildAt(0);     //references the top child

                       

                      So your code can be used like this:

                      exportRoot.StopPlanet.addEventListener("click", fl_MouseClickHandler);

                      function fl_MouseClickHandler()

                      {

                           exportRoot.Planet10.stop();

                      }

                       

                      With the code formatted as javascript, my Publish Settings dialog changed to look like this:

                      MyPublishSettingsDialogWithJSCode.png

                      I don't know how the publish process was designed to work because this is my first attempt. But notice that I can't de-select the JavaScript/HTML check box. I also can't tell Animate where I want the OAM file to be published. With everything as you see above, when I publish, Animate produces the Javascript/HTML files in the location selected above. It took me a few moments to find the OAM file which I did find, in the same folder as the FLA file.

                       

                      The process feels a bit counter intuitive because I thought I should be able to specify the OAM location, and didn't expect to see anything for the Javascript/HTML output. In this case, I don't need and can't use the Javascript/HTML output.

                       

                      When you're publishing as OAM package, it requires Javascript/HTML option also to be enabled and hence you will not be able to deselect it.

                       

                      And once you click on the OAM Package option in the left side column, you can view more options related to OAM publish such as choosing the output folder for generated OAM.