hi i'm trying to clear the text from the chat component. it works fine with clearHistory() but it clears it for all ppl what is not what i want. how can i clear the text for only 1 client when he enters the chat? thank k
Hi, this should be a simple one, Try this with the user or any user that you do not want to receive the chat history from, After they have connected and the history has been loaded: chat_mc.history_txt.htmlText = ""; When you initiate and connect to the chat component by default the user will load the history of the chat up until that point. The way the chat component works is with two shared objects one is message_so and the other is history_so. The history shared object only stores the history of the chat up until the point when clearHistory() is called. The way that users receive messages is through the message_so. The message_so broadcasts to all users that a new message has been sent. It then appends the message to the history_so BUT this does NOT broadcast that the history shared object has been updated. Essentially, what I am saying is that the only way after connecting that users receive chat text is through the message_so. The client holds the history from the history_so in memory but you can wipe this at any time on any client. When the history_so gets updated, it will not repopulate all of the history. Hope this helps,
but where would I put this command? Placing it on the main timeline after the chat_mc.connect dosn't work. I could place it directly in the chat component at FCChatClass.prototype.receiveHistory, but is this the best spot?
Don't see what you're looking for? Try a search.
|