actionscript 3 - show last 100 lines textArea AS3 Flash -


I have a very busy chat app and Textaria is ready to clean itself after a certain text, but What do I want to show the last 100 lines of text in Textaria and remove the rest.

The use of Flash CC

The text comes from the Red5 server like this:

 < Rescue message (user name: string, message: string) on ​​code> function: zero {if (myTextArea.length> 21400) {myTextArea.htmlText = ""; } // To add text to text. MyTextArea.htmlText + = "& font color = '# ff0000' & gt; + + User Name +": "+ Message" & lt; / Font & gt; ";}   

So, the last 100 lines have any idea to keep the chat? Thanks!: -)

I store all the messages I receive in just one message:

  different messages: array = []; Username: string, msg: string): zero {messages.push ({username: username, msg: msg}) displayMessages (); // look lower.}   

And drew past 0-100 objects for performance Press:

  function display message (): zero {myTextArea.htmlText = ""; recently: array = message. Slices (-100); for each (var i: object hall Only) {myTextArea.htmlText + = "& lt; Font color = '# FF0000' & gt; + IuserName + ":" + i.msg + "& lt; / font & gt;"; }}    

Comments

Popular posts from this blog

jasper reports - How to center align barcode using jasperreports and barcode4j -

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -