There is a size limit of how big an action script file can be. According to adobe’s tech note, this limit is 32 kb. Well, this does not seem to be exactly 32kb when watching the file size when we right click on the .as file and check its properties. Some times some .as files are more than 32kb yet they work fine without any compiler warning. So flash users need not get confuse with this limit in terms of how much disc space you .as file takes. Even there is no exact lines of code that would result in some compiler error saying .as file has exceeded 32kb file size limit. One may get this at 4000 lines of code and may be with only at 1200 lines of code.
In most practical cases it comes when we have large if-else block in class files. Because each if conditions are checked when some condition arrive and it keeps on adding file size until the condition is satisfied. If a single if block is having large nested if-else blocks then there is chance of getting this limit. Some times a large class may also create this limitation problem.
It’s a better practice to use switch statements instead of if-else where ever possible. If only if-else solves your purpose, then try to delegate the work in to separate classes. Again it’s a better idea to make classes not so large, which assures us not to reach the compilation limit.