Limitiation on # of lines of Actionscript code

I’m posting here because I need to understand some undocumented limitations on Flash.

My flash movie returns an error (often an object not found error) when too many lines of actionscript code are loaded into a particular frame. The problem is that Flash can only accomodate so many lines of code loaded into a particular frame ( or some related problem ). I know this is the case, because editing out lines of code unrelated to the error makes the program work. I have tested this quite thoroughly and am certain that the problem is related to Flash rather than a coding error. My program has quite a few lines of code (around 20,000 lines, all told) and it seems to have problems when a certain number (several thousand) are loaded into one frame. Redoing the project in another program is not an option at this point.

(Yes, I know Flash isn’t supposed to be used for such robust applications, but the project has ballooned since inception).

I’m trying to make my program more compact and efficient now, so that I don’t have to decrease any functionality. It would be very helpful to know exactly what I need to be decreasing (rather than just ‘lines of code’) so that this task could be expidited. Does anyone know what is going on ‘behind the scenes’ such as a limit to the number of pointers flash will allocate, etc?

Similarly, I’ve tried loading script from inlcude files only as needed by the program, and I thought that that was working but now I see that it isn’t.

If it’s of any help, the lines causing the problem are part of a quiz. For example, I’ll have 8 different catagories, with each catagory containing 25 questions and each question containing a question, possible answers, the correct answer, and the reason that the correct answer is correct. So the problem is with text rather than multimedia.

Thanks very much for any help, suggestions or (constructive) observations



wow, > 20 000?!

i’m afraid i’ve no idea about number of pointers, etc. 20 000 is many lines of code but in computer terms is miniscule. it’s disappointing to see these limits.

one thing flash does have going for it is that it’s very object oriented. if you’re not doing this already, you might try breaking down some of your code into functions and re-using it through out the movie.

this is just a shot in the dark though.

if you do discover any of those technical points, please post them. i’d love to know, just for knowing.

I’m clueless also. Interesting information though.

I also will say. 20,000!! Holy crap

Your problem, as far as i know, is not the physical amount of code/lines, but the execution/reading of it!
Flash is set to a certain fps (frames per sec), your code is in ONE frame, so Flash has only a very short time to read all those lines, there´s a max number of instructions it can carry out, after that, just as you said, it will return an error.
Try breaking up your code into functions, and use more than one frame (like:good answer goes to next frame with same layout and diff. question).
Lemme know if this helps…

@_@!!! 20k !!! JESUS!