[Flashjs] Undefined?
Wade Arnold
wade at t8design.com
Wed Jun 15 23:45:48 PDT 2005
I can't seem to make this work? I am passing a call from javascript to
flash and getting a value of undefined. I feel that I followed the
documentation properly. Anyone care to point me in the right direction!
Much appreciated.
Wade
/** HTML **/
<html>
<head>
<title>samplePg</title>
<script type="text/javascript" src="javascript/Exception.js"></script>
<script type="text/javascript" src="javascript/FlashTag.js"></script>
<script type="text/javascript"
src="javascript/FlashSerializer.js"></script>
<script type="text/javascript" src="javascript/FlashProxy.js"></script>
<script type="text/javascript">
var uid = new Date().getTime();
var flashProxy = new FlashProxy(uid, 'JavaScriptFlashGateway.swf');
function fireAlert() {
flashProxy.call('myNewText', 'Display this text');
}
</script>
</head>
<script type="text/javascript">
var tag = new FlashTag('samplePg.swf', 760, 610); // last two arguments
are height and width
tag.setFlashvars('lcId='+uid);
//document.write(tag.toString());
tag.write(document);
</script>
<input type="button" name="one" value="click me" onclick="fireAlert();">
</body>
</html>
/** FLASH ** /
import com.macromedia.javascript.JavaScriptProxy;
var proxy:JavaScriptProxy = new JavaScriptProxy(_root.lcId, this);
function myNewText(newText:String) {
this.myTextArea.text = newText;
}
More information about the Flashjs
mailing list