List Info

Thread: Compile errors in JavaScriptProxy.as




Compile errors in JavaScriptProxy.as
user name
2006-12-04 18:50:11

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&quot; xml:lang="en&quot; lang="en&quot;>
<head>
 &nbsp; <title>Javascript To Flash</title>
 &nbsp; <meta http-equiv="Content-Type&quot; content="text/html; charset=iso-8859-1&quot; />
<!--&nbsp;  <script type=";text/javascript" src="JavaScriptFlashGateway.js"&gt;</script> -->
 &nbsp; <script type="text/javascript" src="kit/Exception.js"></script>
 &nbsp; <script type="text/javascript" src="kit/FlashTag.js"></script>
 &nbsp; <script type="text/javascript" src="kit/FlashSerializer.js&quot;></script>
 &nbsp; <script type="text/javascript" src="kit/FlashProxy.js"></script>
 &nbsp; </script>
</head>

<body>
<div align="center">

 &nbsp; <script type="text/javascript">
 &nbsp; &nbsp;  var uid = new Date().getTime();
 ; &nbsp; &nbsp;
var flashProxy = new FlashProxy(uid, 'myFlashContent', 'JavaScriptFlashGateway.swf');
  
</script>
 &nbsp; 

 &nbsp;
<script type="text/javascript">
 &nbsp; &nbsp;  // The arguments below are path, width, height, and Flash Player version.
 &nbsp; &nbsp;  // var tag = new FlashTag('flashContent.swf', 300, 300, '7,0,14,0');
 &nbsp; &nbsp;  var tag = new FlashTag('flashContent.swf', 300, 300);
   ; &nbsp; tag
.addFlashVars('lcId=' + uid);
&nbsp; &nbsp; &nbsp; tag
.setId('myFlashContent');
   ; &nbsp; tag
.write(document);
 &nbsp;
</script>
 &nbsp; <input type="button" value="Call Flash"; onclick="flashProxy.call('loadTestVars', 'hello', 'world')&quot; />

</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)
{
 &nbsp; testvar1 = aVar1;
 &nbsp; testvar2 = aVar2;
}

************************* Flash code End *******************

Thank you for your help. Looking forward to anyone's response.

Best Regards,
Gadhi


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )