JSFL, Actionscript and MMExecute Shortcut

March 7th, 2008 by Steven Sacks

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

2 Responses

  1. Steven Hargrove

    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?

  2. Steven Sacks

    Right you are! Thanks!

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

About Steven Sacks

I am a professional Flash developer with over 13 years of programming experience. I have consulted for high-profile agencies and companies in San Francisco, Los Angeles, Atlanta and New York, and developed numerous award-winning websites and rich internet applications for clients including Adobe, Fox Sports, FX Networks, Anheuser-Busch, GE, DirecTV, ESPN, The Weather Channel, Home Depot, and Coca-Cola.

I am the author of the open-source Gaia Framework for Adobe Flash, which dramatically reduces development time and makes developing Flash sites much easier.