I do not believe that there is, but I think you can force the closure anyway.
I do not believe that there is, but I think you can force the closure anyway. Not entirely certain how simple this will be, but here would be my best guess. When instantiating your LocalConnection, be sure to include this in the client (or as a property in AS2): function close() { myConnection.close(); } In addition to that, I would include this while attempting to have the connection connect: var commName:String = "MY_CONNECTION"; var myConnection:LocalConnection = new LocalConnection(); // Try to tell any open LocalConnection on this channel to close.
// This may cause an AsyncErrorEvent, so be sure to add the appropriate // Error handling. MyConnection. Send( commName, "close" ); try { myConnection.
Connect( commName ); } catch( error:Error ) { // If there is another connection already open on the same channel, // that will cause an Error. I have had some luck catching that // Error and then calling connect again. That said, you would be // best to take precautions anyway.
Try { myConnection. Connect( commName ); } catch( error:Error ) { // Your connection cannot connect! // DO SOMETHING!
} } myConnection. Client = this.
This looks good. I'm interested in closing the connection explicitly because I understand that connection names have to be unique, and if the page is reloaded I don't want the connection to be floating around and causing problems. – Irwin Aug 7 '09 at 17:19.
I guess you could react to the unload event in JavaScript and call some cleanup function in the flex app through the ExternalInterface. Haven't worked much with ExternalInterface though, so I'm not really sure.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.