Entering code into code object can be fraught with errors since characters are difficult to read.
There is a syntax check but again it can be difficult to spot code errors.
On Ubuntu I now write Actionscript2 code in an external file mycode.as
and I view this in Sublime Text with actionscript plugin installed.
Then I copy and paste into Actiona code object. Much better validation process.