When we are including an AS1 file in an Fla which has to be published as AS2, we need to be careful in naming the include file. There shouldn’t be any object initialized in _global which has the same name as the include file.
Say for example,
I had a include file called Security.As and inside that had _global.Security=new Object(). When I published I got the following error
Documents and SettingsarealDesktopSecurity.
ActionScript 2.0 class
scripts may only define class
or interface constructs.
Total ActionScript Errors: 1
Reported Errors: 1
To resolve this issue we need to rename the Security.as file to something else, for example SecuritySystem.as and change the include statement accordingly