Skip to content

Instantly share code, notes, and snippets.

@mattui
Created January 10, 2013 21:04
Show Gist options
  • Save mattui/4505778 to your computer and use it in GitHub Desktop.
Save mattui/4505778 to your computer and use it in GitHub Desktop.
function callFlash(call) {
var flash = document.getElementById('flashapp');
var result = null;
if (flash && flash[call] && typeof flash[call] == 'function') {
if (arguments.length > 1) {
params = [];
for (var i=1; i<arguments.length; i++) {
params[params.length] = 'arguments['+i+']';
}
eval('result = flash[call](' + params.join(',') + ')');
}
else {
result = flash[call]();
}
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment