0 Replies Latest reply on Sep 17, 2010 9:17 AM by DavideBarranca

    CSXSInterface and embedded JSX

    DavideBarranca Level 1

      Hello,

      I know, from the Zak Nelson cookbook, how to embed and then call a jsx:

       

      [ Embed (source= "myScript.jsx" , mimeType= "application/octet-stream" )]
      private static var myScriptClass:Class;

      var jsxInterface:HostObject = HostObject.getRoot(HostObject.extensions[0]);
      jsxInterface.eval( new myScriptClass().toString());

       

      I've used this method in a Photoshop CS5 extension, that I have to port to CS4 - so I need to use the old way:

       

      CSXSInterface.instance.evalScript("myFunction", "myParameter");

       

      which work for functions inside a jsx exactly named as the swf panel. (see the Photoshop panel developer's guide)

       

      I'd rather like to embed several JSX:

       

      [ Embed (source= "myScript.jsx" , mimeType= "application/octet-stream" )]
      private static var myScriptClass:Class;

      Embed (source= "myScript2.jsx" , mimeType= "application/octet-stream" )]
      private static var myScriptClass2:Class;

       

      and then call functions in them via CSXSInterface.

       

      I've tried something like:

      myScriptClass.CSXSInterface.instance.evalScript("myFunction", "myParameter");

      without any luck.

       

      What's the correct syntax for such call? (if there's one...)

      Thanks in advance,

       

      Davide