|
-
How to Avoid the "Abort Script" error & Memory Usage Issues
hi,
i am workin on a game that loads levels. when a level is loaded, the items to be shown in the level are placed on stage by using (while/for) loops (i use alot of arrays in the process). Now the thing is that in some cases, my level has loads n loads of stuff in it and when my application gets on to placing them, i get the error "script in this movie is causing Flash Player to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort the script?". I know this is because my loops have run thousands of times. When i press "No", the script continues to run and within a few seconds my level loads completely with no problem. My question is: is there a way to skip this error? as it will be confusing for my user
I also have a second question, my application file size is 99KB and including the sprites, the maximum the whole thing would go is 2MB. But when I run it and load one of my heavy loaded levels, the memory usage go's upto 110 MB. The memory usage starts from 80MB and seems to grow continuously until it reaches 110 and then goes down and up. Note that this is running in the internet explorer. The memory seems to be possibly some garbage data, (because when i ran some other web app that consumed the memory, the memory usage of my application went down from 110 to 80) but i dont know much in this area. Can someone guide me how i can get rid of any extra memory usage. In cases of average sized levels, the usage go's upto 70 MB. So my second question is: any idea ??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|