I have to detect in my flash if the user closes his browser or goes to another page and the flash is not accessible anymore. How do i achieve that ?
The above worked great for me with one exception: if I return null as my string, I don't want any message to pop up. It works for all browsers except IE, which brings up a dialog box that says "null".
That can be corrected by altering one line to add a null check:
var jsBindEvent:String = "function(){"+qualifiedEventName+"= function(){if (" + jsExecuteCallBack + ") return "+jsExecuteCallBack+"};}";