Macromedia Flash Server - How to limit chat history on client?

This is Interesting: Free IT Magazines  
Home > Archive > Macromedia Flash Server > August 2005 > How to limit chat history on client?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to limit chat history on client?
Stefan Richter

2005-05-19, 7:45 am

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

MJorge

2005-05-19, 7:45 am

*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

Stefan Richter

2005-05-19, 7:45 am

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.gmane.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

Matthew B. Simpson

2005-05-19, 7:45 am

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.gmane.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

Gavin Lilley

2005-08-03, 5: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

Stefan Richter

2005-08-03, 5: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

Simon Lord

2005-08-03, 5: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

Stefan Richter

2005-08-03, 5: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

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com