execute function comes from http://blog.fuelindustries.com/archives/cat_jsfl.html

the trace function is just a rework of theirs to use esacpe and unescape.

Actionscript:
  1. public static function executeJSFL()
  2. {
  3. var file = arguments.shift();
  4. var func = arguments.shift();
  5. var result;
  6. if( arguments.length> 0 )
  7. {
  8. var arg = arguments.join( "\',\'" );
  9. result = MMExecute(((((("fl.runScript(fl.configURI+\'WindowSWF/" + file) + "\',\'") + func) + "\',\'") + arg) + "\');");
  10. }
  11. else
  12. {
  13. result = MMExecute(((("fl.runScript(fl.configURI+\'WindowSWF/"+ file) + "\',\'") + func) + "\');");
  14. }
  15.  
  16. return( result );
  17. }
  18.  
  19. public static function flTrace(str){
  20.  
  21. MMExecute("fl.trace(unescape(\""+ escape(str)+"\"));");
  22.  
  23. }