I have an old, complicated, custom WindowSWF panel which was written in AS2 and makes extensive use of MMExecute to read and modify the Flash environment. The panel works fine in Flash 8, CS4, CS5.5, and CS6.0. I have given it to someone on Animate CC, and it doesn't work. I'm trying to resolve this, even though I don't have Animate CC to test on.
The symptom reported to me is that although the user interface is working correctly, any time a value is supposed to be populated from the Flash environment, it's blank or NaN.
From what little information I can find online, MMExecute was dropped from Flash CC and later put back with very limited functionality. To get full functionality, the recommendation is to switch to ExternalInterface.call. (source) I also see that the callback feature of ExternalInterface doesn't work with AS2, but this is fine, I would think — MMExecute doesn't do that at all.
So I started to try to make the switch. I have a long string of JSFL code which defines JSFL functions. This code was called with MMExecute, but I can switch it to ExternalInterface.call, and then I can call these functions using MMExecute. So at least to some degree, ExternalInterface.call is working.
But if I try to get ExternalInterface.call to do anything directly, it doesn't work. ExternalInterface.call("fl.trace('test');"); does nothing. ExternalInterface.call("fl.createDocument();"); does nothing. If I attempt to get a return value, such as var clickY:String = String(ExternalInterface.call ("fl.tools.penDownLoc.y;")); I get null.
Is anyone able to confirm that replacing MMExecute with ExternalInterface.call is indeed the way to resolve the Animate CC problems? And if so, why can't I get it to run simple commands or to return values?
Thank you, but that's for having a JSFL script send commands to a panel, which is sort of the opposite of what I'm trying to do. (This is also the functionality which I already know requires AS3.) I have a SWF panel which I want to run JSFL code.