Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Converting MMExecute to ExternalInterface.call

Community Beginner ,
Jul 16, 2016 Jul 16, 2016

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?

TOPICS
ActionScript
1.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 23, 2016 Aug 23, 2016

i'm not sure what exactly you're trying to do, but check the swfpanel object here: http://help.adobe.com/en_US/flash/cs/extend/flash_extending_reference.pdf

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 05, 2016 Sep 05, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 06, 2016 Sep 06, 2016
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines