Hi Lucas,
It sounds like the platform should include a workaround for this - can
you file an improvement request in http://jira.openlaszlo.org/ ?
In the mean time, you should be able to call into your app with the
callMethod() or setCanvasAttribute() APIs documented here:
http://labs.openlaszlo.org/trunk-nightly/my-apps/copy-of-hello.lzx?lzr=swf8&lzt=deployment
I'd probably create a canvas method that iterates through the currently
open connections and calls close on them.
Just click the 'Server' button in the dev console to get details. Let
me know if you have questions!
Regards,
Max Carlson
OpenLaszlo.org
On 2/16/10 9:03 AM, Lucas Lain wrote:
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.