A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Adding to file slows down significantly??!!

  1. #1
    Bob (the singing sock)
    Join Date
    Aug 2000
    Location
    Århus, Denmark
    Posts
    472
    Hi gang!

    Any idea on how to optimize this code.

    For a projector I am making a list of companys based on variables pulled out of a textfile based database.
    I have an array of companies and an array of types.
    in a loop where i++;

    txtResults += _root.arrCompany_1[i-1] + _root.arrType[i-1] + '\n';

    (' go instead of ")

    The list sometimes adds up to 1000 entries. At first it goes pretty fast but as i increases it is beginning to slow down significantly. Until it down to adding 1 line pr second.

    Does anybody know of a better way of adding to a string?

    Regards //podenphant


  2. #2
    Bob (the singing sock)
    Join Date
    Aug 2000
    Location
    Århus, Denmark
    Posts
    472
    nevermind ... I got it!

    I was updating a textfield for every frame and that pulled the plug on the proccessor!

    I decided to update the textfield after the loop had finished! Works fine!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center