A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Split a string into an array - seems slow?

  1. #1
    Senior Member
    Join Date
    Jun 2001
    Posts
    104
    I have noticed that flash seems to be very slow at splitting a long string into an array. Anyone else noticed that?

    I am pulling a list of files into flash using SWF Studio and into the flash varible called ssfilelist. ssFileList would then look something like this: ("myfile1.txt,myfile2.doc,myfile3.ini,etc...") for 80 files.

    myfilearray = _parent.ssFileList.split(",");

    The above code takes nearly 15 seconds to run with 80 files in it. Worse of all, it stops everything while is splits the string into an array. All movies stop. If there are 150 files in the directory, flash thinks it crashed with the pop up message, do you want to continue!!

    Anyone know of a faster way to do it?

    I am using a win 98SE on a p400.

    BTW, i have split the code out into different frames and SWF studio grabs the files from the folder and populates the flash varible very fast, it is when flash gets to splitting the string into an array that everything stops. Also, SWF studio is a 3rd party application for flash and for cdrom deployment. However, this question was unanswered on the Standalone forum. I thought maybe the actionscript code might be more familiar to this group.
    __________________
    Jim Booth


  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,039
    Hi,

    here is some code I found at one of these forums: http://board.flashkit.com/board/show...hreadid=194633

    Musicman

  3. #3
    Senior Member
    Join Date
    Jun 2001
    Posts
    104

    thanks musicman...

    Thanks a bunch Musicman....

    I tried that code, it dropped the time to run it from 15 seconds to 3 seconds. But I don't have a clue how? Anyone got any ideas? I used to think i knew actionscript. But after this huge breakthrough, I see I don't!

    thanks again Musicman. This was a huge help!

  4. #4
    Registered User
    Join Date
    Aug 2000
    Posts
    45

    Post SWF Studio??

    Where Can I get more info on this SWF Studio???

    thanX

  5. #5
    Senior Member
    Join Date
    Jun 2001
    Posts
    104

    SWF studio

    SWF Studio is made by Northcode. http://www.northcode.com. It is a very cool tool, for making windows exe's. Let me know if you need more info..

    jim

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