0

Greetings everyone...

I've made a little flash, with AS3, to view the data generated by some program I wrote... The data is in a .csv file and are loaded to the memory with a URLLoader object.

The flash loads well .csv files which can come to almost 50 MB in size... But when I try to load a file with 160 MB, the player just stop working... I run the last flash player version, outside of the browser...

I've heard that the Flash has limitations on the amount of memory it can store... But in another question, they say it has not.

What may be causing the crash? - I don't think it is the code, since it runs smooth for small files...

Thank you in advance!

Community
  • 1
  • 1
Girardi
  • 2,734
  • 3
  • 35
  • 50

2 Answers2

1

I did some quick googling and it looks like URLLoader stores the download in memory so there could be some limitations. Another Stack Overflow answer recommends using URLStream along with FileStream. I'd think this would be the most appropriate way to deal with large files based on my experience on other platforms. Are you loading from an http:// or a file:// url?

Community
  • 1
  • 1
Brian Lyttle
  • 14,558
  • 15
  • 68
  • 104
  • AS2 had something like a 64k limit for the URLLoader's buffer. I am not sure what the max is for as3 I have never ran into an issue with it. I would assume since the livedocs don't mention it that the buffer size is max length uint. – Feltope Mar 25 '11 at 23:50
  • Actually, it may solve the problem, but I don't know how to use URLStream to read the file line by line, sequantially... Another problem is that at every line read, I would have to explode it by the "commas" to read the data... Probably my program would become very slow... So I need to input the data into memory... – Girardi Mar 31 '11 at 22:15
0

Working with flash now, it came to me the error:

Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.

In the menu File > Publish Settings..., we can make the timeout period longer on the Flash tab.

I also found an implementation of something like asynchronous processing in actionscript... It's a very interesting approach and I'll try to implement my loading method that way...

Thank you all for your help!

Girardi
  • 2,734
  • 3
  • 35
  • 50