2 Replies Latest reply on May 18, 2017 3:35 PM by bluebeezle

    mmexecute undo

    bluebeezle Level 1

      Hey guys,


      I noticed that when I run scripts from a custom panel I created, I can't undo the entire script in one go. Running undo after running a script steps backward one step in the script execution. If I run a JSFL file directly, it undoes the entire script just fine. I'm finding online that other people have run into this problem when they use mmexecute, which I'm using as well.


      Are there any ways around this problem while still using mmexecute? or are there alternatives to using mmexecute that I could use to run external jsfl files from a panel, while also passing in some arguments?



        • 1. Re: mmexecute undo
          Preran Adobe Employee

          Not the exact answer to your question but the details are available in this article.


          adobe.utils - Details Adobe ActionScript® 3 (AS3) API Reference

          • 2. Re: mmexecute undo
            bluebeezle Level 1


            The culprit is fl.runscript. When I use MMExecute and fl.runScript to run an external JSFL without using fl.runScript's optional second parameter, I can undo the entire script in one go just fine. But as soon as I use fl.runScript's second argument (a function name, to run a particular function and pass in arguments), undoing only goes back step by step.



            MMExecute("fl.runScript(fl.configURI + 'WindowSWF/test.jsfl');");

            works with one hit undos, not

            MMExecute("fl.runScript(fl.configURI + 'WindowSWF/test.jsfl', 'runScript');");


            On top of that, running the JSFL directly in the MMExecute command also does not work with undos.


            At this point, I'm at a loss, because I need to be able to pass arguments between the AS3 panel and the JSFLs. Is there any other way to do that?