The following is the sample code
HTML
====
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>FlashSar</title>
<script type="text/javascript" src="JavaScriptFlashGateway.js"></script>
<script>
function updateStatus(message) {
window.status = message;
}
</script>
</head>
<body bgcolor="#ffffff">
<div id="flash">
<script type="text/javascript">
var uid = new Date().getTime();
flashProxy = new FlashProxy(uid, 'JavaScriptFlashGateway.swf');
var tag = new FlashTag('t2.swf', '600', '300');
tag.setFlashvars('lcId='+uid);
tag.write(document);
</script>
</div>
</body>
</html>
Action script
=============
// Set up Flash Integration
import com.macromedia.javascript.JavaScriptProxy;
var jsProxy:JavaScriptProxy = new JavaScriptProxy(_root.lcId, this);
ib1.onRelease=function()
{
trace("Hello");
jsProxy.call ("updateStatus","From flash");
}
Im trying to call a javascript function on the click on a flash button.
But I don't see the javascript function to be called.
Thanks
Prasanna
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Nagasamudram, Prasanna Kumar
Sent: Wednesday, September 19, 2007 4:27 PM
To: Open Source Flash Mailing List
Subject: [osflash] From Flash to Javascript...
Hi All
I'm using Java script/Flash integration kit to communicate b/w
Javascript and flash using the
flashProxy.call("someflashmethod","params");
But
If I do the same thing from flash to javascript I see that the
javascript function is not being called.
proxy.call("somejavascriptmethod","params");
Can you please give me some pointers ?
Thanks
Prasanna
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org