Hello everybody,

Looking on the web, I found this solution to implement the
NetConnection shutdown before the browser window is closed.

I'm trying to modify mediastream.lzx to include the actionscript part,
so I can reuse it in the future (maybe you can include it in the next
version)

The thing is I don't know where I can insert the "exShutDown" function.

Any ideas? max?

in actionscript:

import flash.external.Externalnterface();
ExternalInterface.addCallback("shutdown",exShutdown);
public function exShutDown():void {
           your-net-connection.close();
}


So I can use in the serving webpage:

<script type="text/javascript>window.beforeonunload=function(e) {
      document.getElementById("whateveryoucallit").shutdown();
}
</script>


Thanks in advance.


-- 
Lucas

Reply via email to