Hi guys..im tryign to make a call from javascript to an actionscript function using the javascript and flash integration kit. The flash file is called index.swf. And the code in the holding page is as follows:
In my flash file index.swf I have a functionCode:<html> <head> <script type="text/javascript" src="JavaScriptFlashGateway.js"></script> <script type="text/javascript"> var uid = new Date().getTime(); var flashProxy = new FlashProxy(uid, "JavaScriptFlashGateway.swf"); </script> </head> <body bgcolor="#ffffff"> <script type="text/javascript"> var tag = new FlashTag("index.swf", 550, 400); // last two arguments are height and width tag.setFlashvars("lcId="+uid); tag.write(document); flashProxy.call("showAlert", "my string"); </script> </body> </html>
All the files index.swf,index.html,JavaScriptFlashGateway.swf, and JavaScriptFlashGateway.js are in the same directory...Code:function showAlert(){ tName.text = "hello"; }
however the flash function does not seem to get called... has anyone got any tips or ideas why?
Thanks in advance
Note: the javascript integration kit can be downloaded from http://weblogs.macromedia.com/flashjavascript/ ..all the documentation is contained within the package..




Reply With Quote