Hi,

I'm trying to save my text history on button click, but I'm messed up.

It only works works once and I'd like it to keep working in case the user opts not to leave the room and prefers to save his history later.

Besides this, nothing is saved. Where am I going wrong?

It's going to be hard for me to explain without attaching the file here, but it is about a chat.

Here's the code wheere I have things happening:

Code:
feedback_txt._visible = false;

textFeedback("Text del xat copiat al portapapers!! Recorda de copiar-lo a un arxiu i tornar-lo a desar");

function textFeedback(theFeedback:String) {
	feedback_txt.text = theFeedback;
	setTimeout(function () {
		feedback_txt.text = "";
		feedBack_mc.swapDepths(userList_lb);
	}, 12000);
}

myMouse.onMouseUp = function() {
	Selection.setFocus("input_txt");
	exit_btn.onPress = function():Void  {
		if (!_global.isBusy) {
			closeConnection();
		}
	};
	saveChat_btn.onRelease = function() {
		chat_txt._visible = true;
		Selection.setFocus("chat_txt");
		Selection.setSelection(0, chat_txt.text.length);
		System.setClipboard(chat_txt.text);
		feedback_txt._visible = true;
	};
};
Can anything here affect the reason why the chat isn't copied in the clipboard?