|
Hello everyone,
I am experimenting with the JavaScript Integration kit, and I am running through some problems. I am get the following errors in the JavaScriptProxy.as module after the local_connection is created. Please let me know what I am doing wrong. I am having a lot of difficulty from this very start. PS: I am using Flash MX 2004. I am planning on experimenting with the blog.deconcept.com/code/ontkit/, but I wanted to first get over this hump since it seems that I am having some basic conceptual problem.
****************************************************
**Error** C:WipFlashIntegrationKitJavascriptIntegrationcommacromediajavascriptJavaScriptProxy.as: Line 108: There is no property with the name 'controller'.
receiving_lc.controller = this;
**Error** C:WipFlashIntegrationKitJavascriptIntegrationcommacromediajavascriptJavaScriptProxy.as: Line 110: There is no property with the name 'callFlash'.
receiving_lc.callFlash = callFlash;
Total ActionScript Errors: 2 Reported Errors: 2
****************************************************
Here is my code:
************** JScode Start **************************
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Javascript To Flash</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- <script type="text/javascript" src="JavaScriptFlashGateway.js"></script> -->
<script type="text/javascript" src="kit/Exception.js"></script>
<script type="text/javascript" src="kit/FlashTag.js"></script>
<script type="text/javascript" src="kit/FlashSerializer.js"></script>
<script type="text/javascript" src="kit/FlashProxy.js"></script>
</script>
</head>
<body>
<div align="center">
<script type="text/javascript">
var uid = new Date().getTime();
var flashProxy = new FlashProxy(uid, 'myFlashContent', 'JavaScriptFlashGateway.swf');
</script>
<script type="text/javascript">
// The arguments below are path, width, height, and Flash Player version.
// var tag = new FlashTag('flashContent.swf', 300, 300, '7,0,14,0');
var tag = new FlashTag('flashContent.swf', 300, 300);
tag.addFlashVars('lcId=' + uid);
tag.setId('myFlashContent');
tag.write(document);
</script>
<input type="button" value="Call Flash" onclick="flashProxy.call('loadTestVars', 'hello', 'world')" />
</div>
</body>
</html>
************************* JScode End ************************
************************* Flash code Start *******************
import com.macromedia.javascript.JavaScriptProxy;
var proxy:JavaScriptProxy = new JavaScriptProxy(_root.lcId, this);
function loadTestVars(aVar1, aVar2)
{
testvar1 = aVar1;
testvar2 = aVar2;
}
************************* Flash code End *******************
Thank you for your help. Looking forward to anyone's response.
Best Regards,
Gadhi
|