Hello -
I've written a server side extension to keep track of the chat history by intercepting public messages. I am at the point now where I can receive the text in the flash client using a listener for onExtensionResponse. my question is - how do I add the lines of chat to the chatbox_mc? I know I can get a reference using chatbox_mc.chatTextArea
and I'm able to do
chatbox_mc.chatTextArea.text += "chatHistoryLine"
but that doesn't seem the right way to go - the text format's not coming out quite right, plus I'd think there'd be some sort of "addchatline" method
any suggestions?
Extending Bits: Chat History
-
jflowers45
- Posts: 63
- Joined: 11 Jul 2006, 20:52
Extending Bits: Chat History
How you doin?
-
jflowers45
- Posts: 63
- Joined: 11 Jul 2006, 20:52
-
jflowers45
- Posts: 63
- Joined: 11 Jul 2006, 20:52
one step closer ...
the "setPrivateChatUserID" function takes an array to 'initialize' the chatbox component, and I am able to sneak messages in that way - but unfortunately that requires using private chat and I'm trying to do this for public chat
anyhow if there was just some way to do the same sort of initalization for the chatbox_mc ...
the "setPrivateChatUserID" function takes an array to 'initialize' the chatbox component, and I am able to sneak messages in that way - but unfortunately that requires using private chat and I'm trying to do this for public chat
anyhow if there was just some way to do the same sort of initalization for the chatbox_mc ...
How you doin?
Hello.
Currently the ChatBox component doesn't support the message history injection, due to the fact that messages receive some "treatments" before they can be added to the textarea. This is possible for the private chat only, because we keep the "treated" messages in memory, and add them to the textarea when you click on a different user.
We will take your suggestion into account for future releases. In the meanwhile you can get the SmartFoxBits version containing the source files, and modify them by yourself.
Currently the ChatBox component doesn't support the message history injection, due to the fact that messages receive some "treatments" before they can be added to the textarea. This is possible for the private chat only, because we keep the "treated" messages in memory, and add them to the textarea when you click on a different user.
We will take your suggestion into account for future releases. In the meanwhile you can get the SmartFoxBits version containing the source files, and modify them by yourself.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
-
jflowers45
- Posts: 63
- Joined: 11 Jul 2006, 20:52
Re: Extending Bits: Chat History
With the imminent release of SmartFoxServer we will also release SmartFoxBits 1.1, which are now compiled with the latest SmartFoxServer API and contain some improvements asked by users.jflowers45 wrote:I've written a server side extension to keep track of the chat history by intercepting public messages. I am at the point now where I can receive the text in the flash client using a listener for onExtensionResponse. my question is - how do I add the lines of chat to the chatbox_mc?
With the new version you will be able to inject previous messages ("chat history") in the ChatBox component when a room is joined. All you will have to do is listen to the SFSEvent.onJoinRoom event and call the ChatBox.setMessagesQueue method passing an array of message objects (objects containing the following properties: "userId" and "userName" of the sender and "text" of the message).
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team