0 Replies Latest reply on Jul 21, 2013 10:28 AM by Smitty1265

    EternalInterface.call to JSX from Flex not returning value in InDesign CC

    Smitty1265

      I am trying to run a set of jsx scripts and a flex plugin, that the script opens, in InDesign CC. It all worked fine in previous versions since InDesign 3. In the jsx, after the swf is loaded, the script does this:

       

      this.fp.getParagraphStyles = getParagraphStyles;

       

      The actionscript of the flex plugin does this:

       

      var paragraphStyleStr:String = ExternalInterface.call("getParagraphStyles");

       

      In the javascript implementation of getParagraphStyles, I have added alerts and I can see that it does get invoked properly from the actionscript external interface call and, right before the return statement, the string variable that is returned is properly populated.

       

      But in the next line in the actionscript code after the external interface call, if I alert on the value of paragraphStyleStr, it is null. I have a try / catch around the call and it does not throw an error.

       

      The above function is just one example. I have a number of such functions that are called in the jsx from actionscript as external interfaces. In all cases, the invocations are fine, but while return values are properly populated in the jsx function they are not showing up in the actionscript variable that accepts the return value from the call.

       

      Is this a bug or is there some item of configuration in InDesign CC that perhaps I am overlooking?

       

      Also, I noticed that the InDesign CC SDK is not officially released yet. Is the integration I'm trying to test reliant on the gelling and release of the SDK?

       

      Any help appreciated.

       

      Much thanks in advance,

       

      David