It's flash's response to that AS, which may or may not be due to fla corruption. Even if the script were completely evil and invalid, the worst it should be able to do to flash is cause it to throw compile errors.
I'd guess that the same code compiled with the flex sdk would be absolutely fine.
I removed the package code and public text to make this not error. Would that cause it not to work? also what is the purpose of wrapping it in a package and using the public/private types of functions? I know I should search.
When you're using separate actionscript files rather than frame script you need to put things in packages, and you really really should specify public/private (if you do not specify it goes into one of the scopes anyway and you get warnings).
In frame script, you're not allowed to put things in further packages or mark public/private because frame script is essentially the body of a generated function which is already in a package.