Call jsx function from Flex with multiple arguments

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

jaysonp

Call jsx function from Flex with multiple arguments

Post by jaysonp »

In CS5, I'm using the CSXS Library and am able to call a function in jsx and pass arguments from Flex/Flash Builder without a problem. Example:
Code: Select allCSXSInterface.instance.evalScript("myfunc", "param1", "param2");

However, when I try to run this in CS4, the javascript function "myfunc" does not fire. If I use ExternalInterface, I'm able to get the javascript function to fire but all the parameters come in as "undefined".
Code: Select allExternalInterface.call("myfunc", "param1", "param2");

How do I call a javascript function and pass multiple arguments in Flex to a jsx file that is compatible with both CS5 and CS4?