It occurs to me that you could simplify this at the JavaScript end, like this:
So it sends whatever function name and arguments you want without having to have a separate JavaScript function for each one. So you can invoke any Flash function with the following syntax:Code:<SCRIPT LANGUAGE="JavaScript"> <!-- function flashFunc(func, args) { window.document.testfunc.SetVariable('myFunction',func); window.document.testfunc.SetVariable('args',args); } //--> </SCRIPT>
so for example we could do the same as the setAlpha example above, like thisCode:flashFunc(FunctionName,arguments)
Assuming of course that the code exists at the Flash end to deal with whatever functions you are calling.Code:flashFunc('setAlpha','box,100')




Reply With Quote