JSFL, Actionscript and MMExecute Shortcut
One of the pains of communicating from a Flash panel to a JSFL script is the cumbersome MMExecute and passing all those strings and value pairs as strings. Here is a helper method that takes any number of arguments and simplifies MMExecute commands in Flash panels.
function runScript() { return MMExecute('fl.runScript("' + arguments.join('","') + '");"); }
Posted in Actionscript, Bugs, JSFL, Other, Tips/Tricks
March 14th, 2008 at 6:31 am
I may be totally off because I'm not 100% certain on what you're doing with that function, but couldn't you shorten it just to:
function runScript()
{
var str:String = 'fl.runScript("' + arguments.join('","') + '");';
return MMExecute(str);
}
what do you think?
March 14th, 2008 at 9:37 am
Right you are! Thanks!