Ok, I posted in a completly different thread before about the a onclose function and I have done my research and I have found script that sends variables to a flash file and script that does a function when the pages closes and I have combined them together. Unfortunatly, it is not working, and since I know only PHP, VB, HTML and Flash I have no clue what I am doing wrong. Provided below is the script I have in the file that contains the flash movie.
code:
<script type="text/javascript">
function focusout(){
game.SetVariable("unloadvar", "true");
}
</script>
<body bgcolor="#000000" onLoad="focusout();">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="380" height="224" id="game" align="middle">
<param name="allowScriptAccess" value="sameDomain" >
<param name="movie" value="game.swf" >
<param name="menu" value="false" >
<param name="quality" value="high" >
<param name="bgcolor" value="#ffffff" >
<embed src="game.swf" menu="false" quality="high" bgcolor="#ffffff" width="380" height="224" name="game" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" swLiveConnect="true" pluginspage="http://www.macromedia.com/go/getflashplayer" >
</object>
Now in the flash file I have something like this:
code:
this.onEnterFrame = function(){
if(unloadvar == true){
txtstatus = "Variable changed";
delete this.onEnterFrame;
}
}
If someone can help me with this, I would really appreciate it greatly. I need to know this as soon as possible. Any help is greatly appreciated and thank you for taking the time to read this message.
Thanks,
Andrew




Reply With Quote