This may be a well-known issue, and it may have been posted here before, but I thought I'd write a quick note about an obscure problem I've been dealing with for the last two days (Flash 8, AS 2.0):
I had an AS file that is over 4000 lines long. I know this is a sign of bad code, and it IS bad code. But it's legacy code. When I get a chance, I'll rewrite it and divide it up into classes. Anyway, this file was sucked into frame one, via an #include. As I added code, I started to notice weird problems. I pulled my hair out debugging, because the problems had nothing to do with the code I was adding. I'd add something like num=2, and all of the sudden a movieclip would vanish (trace(mc._name) gave me undefined). I removed num=2, and the movieclip came back (trace(mc._name) yielded mc). Sometimes, even adding a comment would case strange errors. To my surprise, I eventually figured out that the errors were caused by the number of lines of code. If I added two lines, no problem. If I added a third, I'd get errors. It didn't matter what that line was or where I inserted it. I got errors. I started googling for "too many lines" and "actionscript" and found various forums where someone had posted a similar story. Usually, people responded by saying, "You must be mistaken. It doesn't matter how many lines of code you use." I fixed the problem by dividing the code up into two AS files and loading one into the first frame and the other into the second. _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

