Search code examples
actionscript-3actionscriptairadobeflash-builder

VerifyError: Error #1053: Illegal override of addEventListener


I'm getting the following error:

VerifyError: Error #1053: Illegal override of addEventListener in    
some.path.to.my.CustomObject

this usually occurs when trying to load an swf/swc when the versions are different, but it's usually with a custom library, not a flash method like addEventListener. My libraries are at the same AIR SDK 3.8 revision, and the top level application has the same version. I was originally using 3.4, but upgraded to 3.8 thinking it might help, but it didn't. I also updated flash player to 11.8, no difference.

The CustomObject it's complaining about has no addEventListener override in it's class or any base class. The base classes are custom also, they are not derived from flash classes. I'm using Flash Builder 4.7.

I'm unable to compile, and have no idea how to resolve this issue, help is appreciated.


Solution

  • Change the package name of the Custom Object, and any methods involved. If the same error persists as an error with the original namespace then you have pre-complied code in your libraries that needs to be removed. You would have to recreate the SWCs potentially. (I am still unsure what libraries you are importing, be careful that you aren't accidentally importing Libraries in your publish settings)

    One possibility is that you aren't importing the correct objects by accident: for example class this.package.here.BouncingBall but in fact are importing fl.events.animations.BouncingBall instead.