Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > 123 Flash Chat Server Software > 123 Flash Chat Support

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-19-2004, 09:39 AM
Maverick
Guest
 
Posts: n/a
Default Bug - Enter key

I would like to submit the following "bug":

Open the flash client (f.ex the demo client on www.123flashchat.com), login and enter a room. Now hold the enter key. You will see you get a flood message and your chat message only contains empty lines.
When you hold the enter key too long, it can happen that you begin typing at the second line instead of the first one (in the textfield).

The users of my chat have problems with this, maybe also because they use somewhat older computers.

Kind regards,
Maverick
  #2 (permalink)  
Old 01-19-2004, 09:49 AM
Maverick
Guest
 
Posts: n/a
Default Re:Bug - Enter key

I have just solved the problem with the following code:

(I have put it in buttons.as)

Code:
function LTrim(str)
{
        var whitespace = new String(" \t\n\r");
        var s = new String(str);
        if (whitespace.indexOf(s.charAt(0)) != -1) {
            var j=0, i = s.length;
            while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
                j++;
            s = s.substring(j, i);
        }
        return s;
}

function RTrim(str)
{
        var whitespace = new String(" \t\n\r");
        var s = new String(str);
        if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {
            var i = s.length - 1;
            while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)
                i--;
            s = s.substring(0, i+1);
        }
        return s;
}

function Trim(str)
{
        return LTrim(RTrim(str));
}
And in buttons.as / function sendmsg(mc) :

Code:
op_mc.messageInput.text = Trim(Trim(op_mc.messageInput.text));
(this code before
Code:
if (op_mc.messageInput.text == "")
***{
******return;
***}

***if (!canTalk)
***{...
)


This is it and this added code works for me to solve the "bug".

Good luck!
Maverick
  #3 (permalink)  
Old 01-19-2004, 11:18 AM
joy joy is offline
Senior Member
 
Join Date: Nov 2003
Posts: 361
Default Re:Bug - Enter key

We've noticed that,
thank you for sharing.
we'll fix this in version 1.4.
Closed Thread

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:41 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.