How to limit chat history on client?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Macromedia Flash Server > How to limit chat history on client?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    How to limit chat history on client?  
Stefan Richter


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-19-05 12:45 PM

Hi,
I am using a normal listbox to display a chat history on the client. Is
there a property or simple script that I can use to truncate the amount of
text that goes in there?
Say I want to limit the amount of text to 100 lines, how would I do that?

Stefan




=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm






[ Post a follow-up to this message ]



    Re: How to limit chat history on client?  
MJorge


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-19-05 12:45 PM

*maybe myListBox*.setRowCount(*rows*) ???

On 5/19/05, Stefan Richter <stefan-fMeCE+ULXElEfu+5ix1nRw@public.gmane.org> wrote:
>=20
> Hi,
> I am using a normal listbox to display a chat history on the client. Is
> there a property or simple script that I can use to truncate the amount o=
f
> text that goes in there?
> Say I want to limit the amount of text to 100 lines, how would I do that?
>=20
> Stefan
>=20
>=20
>=20
>=20
> =3D-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =3D-----------------------------------------------------------
>=20
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>=20



--=20
------------------------------------------------------------
M=E1rio Jorge
Mail: info-ytxgWPgSEmhwATOyAt5JVQ@public.gmane.org
Web: http://www.beedigital.net
Blog: http://www.beedigital.net/blog

=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm






[ Post a follow-up to this message ]



    RE: How to limit chat history on client?  
Stefan Richter


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-19-05 12:45 PM

Sorry I was talking rubbish...

Not listbox - textarea!

I can't find info on setRowCount (I guess this would apply to listbox
anyway) b ut there is a maxChars property for the textarea. Still I am =
not
sure if that will actually do what I need as it appears to apply to =
editable
textareas...

Stefan

=20

> -----Original Message-----
> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org=
20
> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gman
e.org] On Behalf Of MJorge
> Sent: 19 May 2005 11:13
> To: FlashComm Mailing List
> Subject: Re: [FlashComm] How to limit chat history on client?
>=20
> *maybe myListBox*.setRowCount(*rows*) ???
>=20
> On 5/19/05, Stefan Richter <stefan-fMeCE+ULXElEfu+5ix1nRw@public.gmane.org
> wrote: 
> the client.=20 
> would I do that? 
>=20
>=20
>=20
> --
> ------------------------------------------------------------
> M=E1rio Jorge
> Mail: info-ytxgWPgSEmhwATOyAt5JVQ@public.gmane.org
> Web: http://www.beedigital.net
> Blog: http://www.beedigital.net/blog
>=20
> =3D---------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =3D---------------------------------------------------------
>=20
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>=20



=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm






[ Post a follow-up to this message ]



    RE: How to limit chat history on client?  
Matthew B. Simpson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-19-05 12:45 PM

Thinking out loud here...since messages are placed into a history array,
create a recursive loop inside say FCCHATClass.prototype.receiveHistory
function which counts the number of messages in the history array and the=
n
clear the history array when it reaches 100?

HTH

MS


-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.
org]On Behalf Of Stefan
Richter
Sent: Thursday, May 19, 2005 6:30 AM
To: 'MJorge'; 'FlashComm Mailing List'
Subject: RE: [FlashComm] How to limit chat history on client?


Sorry I was talking rubbish...

Not listbox - textarea!

I can't find info on setRowCount (I guess this would apply to listbox
anyway) b ut there is a maxChars property for the textarea. Still I am no=
t
sure if that will actually do what I need as it appears to apply to edita=
ble
textareas...

Stefan



> -----Original Message-----
> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gman
e.org] On Behalf Of MJorge
> Sent: 19 May 2005 11:13
> To: FlashComm Mailing List
> Subject: Re: [FlashComm] How to limit chat history on client?
>
> *maybe myListBox*.setRowCount(*rows*) ???
>
> On 5/19/05, Stefan Richter <stefan-fMeCE+ULXElEfu+5ix1nRw@public.gmane.org
> wrote: 
> the client. 
> would I do that? 
>
>
>
> --
> ------------------------------------------------------------
> M=E1rio Jorge
> Mail: info-ytxgWPgSEmhwATOyAt5JVQ@public.gmane.org
> Web: http://www.beedigital.net
> Blog: http://www.beedigital.net/blog
>
> =3D---------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =3D---------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>



=3D---------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=3D---------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm




=3D-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=3D-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm






[ Post a follow-up to this message ]



    Re: How to limit chat history on client?  
Gavin Lilley


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-03-05 10:45 PM

not strictly following this thread, but in a simlar vein.

is it possible to ignore the chat history when logging in to a new session=
=20
so that the client only sees wheat is occuring after he/she starts to use=
=20
the chat room?


--=20


Gavin Lilley
Technical Consultant
CrISPUK.NET Limited
t. +44 (0) 1905 779112
f. +44 (0) 1905 797666
e. gavin-7GrnRsipluzR7s880joybQ@public.gmane.org

=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm






[ Post a follow-up to this message ]



    RE: How to limit chat history on client?  
Stefan Richter


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-03-05 10:45 PM

I presume you use the textchat component?

Try commenting out line 95-102

/*
FCChatClass.prototype.receiveHistory = function(h) {
var history;
for ( var i = 0; i < h.length; i++ )
history += h[i];

this.history_txt.htmlText = history;
this.history_txt.scroll = this.history_txt.maxscroll;
};
*/

Stefan


-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.
org] On Behalf Of Gavin Lilley
Sent: Wednesday, August 03, 2005 3:32 PM
To: FlashComm Mailing List
Subject: Re: [FlashComm] How to limit chat history on client?

not strictly following this thread, but in a simlar vein.

is it possible to ignore the chat history when logging in to a new session
so that the client only sees wheat is occuring after he/she starts to use
the chat room?


--


Gavin Lilley
Technical Consultant
CrISPUK.NET Limited
t. +44 (0) 1905 779112
f. +44 (0) 1905 797666
e. gavin-7GrnRsipluzR7s880joybQ@public.gmane.org

=---------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=---------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm


=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm






[ Post a follow-up to this message ]



    Re: How to limit chat history on client?  
Simon Lord


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-03-05 10:45 PM

SS: If you're using the standard FCS shipped file then edit some prefs
in --> /scriptlib/components/chat.as

FCChat.prototype.histlen    = 35;   // Maximum history length
FCChat.prototype.persist    = true; // Whether to save history
FCChat.prototype.allowClear = true; // Allow clients to clear history

Set histlen to 0 and persist to false and you should get a blank chat
window whenever you login to any room using the chat.as.  You can edit
your application's main.as file and point to a copy of chat.as if you'd
rather leave the originals alone.

You can alternatively play with the chat components innards and edit
the recieveHistory function and poke around there.


On Aug 3, 2005, at 10:31 AM, Gavin Lilley wrote:

> not strictly following this thread, but in a simlar vein.
>
> is it possible to ignore the chat history when logging in to a new
> session
> so that the client only sees wheat is occuring after he/she starts to
> use
> the chat room?
>
>
> --
>
>
> Gavin Lilley
> Technical Consultant
> CrISPUK.NET Limited
> t. +44 (0) 1905 779112
> f. +44 (0) 1905 797666
> e. gavin-7GrnRsipluzR7s880joybQ@public.gmane.org
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
>
Sincerely,
Simon


=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm






[ Post a follow-up to this message ]



    RE: How to limit chat history on client?  
Stefan Richter


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-03-05 10:45 PM

If you do that also make sure you delete any existing SO's in your app dir
or the old history may show up again and again.

Stefan



-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.
org] On Behalf Of Simon Lord
Sent: Wednesday, August 03, 2005 3:53 PM
To: FlashComm Mailing List
Subject: Re: [FlashComm] How to limit chat history on client?

SS: If you're using the standard FCS shipped file then edit some prefs in
--> /scriptlib/components/chat.as

FCChat.prototype.histlen    = 35;   // Maximum history length
FCChat.prototype.persist    = true; // Whether to save history
FCChat.prototype.allowClear = true; // Allow clients to clear history

Set histlen to 0 and persist to false and you should get a blank chat window
whenever you login to any room using the chat.as.  You can edit your
application's main.as file and point to a copy of chat.as if you'd rather
leave the originals alone.

You can alternatively play with the chat components innards and edit the
recieveHistory function and poke around there.


On Aug 3, 2005, at 10:31 AM, Gavin Lilley wrote:

> not strictly following this thread, but in a simlar vein.
>
> is it possible to ignore the chat history when logging in to a new
> session
> so that the client only sees wheat is occuring after he/she starts to
> use
> the chat room?
>
>
> --
>
>
> Gavin Lilley
> Technical Consultant
> CrISPUK.NET Limited
> t. +44 (0) 1905 779112
> f. +44 (0) 1905 797666
> e. gavin-7GrnRsipluzR7s880joybQ@public.gmane.org
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
>
Sincerely,
Simon


=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm


=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:06 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register