I finally had some time to pick up my Haxe project again, and I updated Haxe and the libraries to the latest version. However now I get this error when I run the .swf file that I built.:
An ActionScript error has occurred:
VerifyError: Error #1053: Illegal override of Component in core.containers.components.Component.
at boot_1346/init()
at flash::Boot/start()
at boot_1346()
I found this thread having the same error, but I have difficulty relating to it. Especially since it worked before I updated to the latest version.
Some background info:
The core.containers.components.Component class is a class that extends MovieClip
My current setup:
Haxe: 3.2.0
Openfl: 3.5.3
Swf: 2.1.6
Before I updated:
Haxe: 3.1.3
Openfl: 3.1.3
Swf: 1.8.9
I hope someone have an idea of what could be going wrong, and what I can try to get it working again.
I tried to rename the class, but it was not the issue.
However after some experimenting and testing I figured out that it was because I was overriding some functions from the MovieClip class, for example get_totalFrames and get_currentFrameLabel, after removing these overrides it is working again.
So I guess it does not allow overrides of base methods?
I recall not being able to override this function before, then they added flash.utils.Object to Haxe to try and duplicate the Object type from AS3, rather than Dynamic (which maps to * in AS3)
I’m not sure if there’s something else we can do to try and match the exact signature.
You are absolutely correct, it works when I just override it like you said. I was too focused on trying out this new way of using setters and getters that I didn’t consider if it actually is a setter or not.
@singmajesty, I tried both openfl.utils.Object and flash.utils.Object with this now correct function, and you were right in that it only works with flash.utils.Object. Using openfl.utils.Object it gives VerifyError: Error #1053 again.
Does not work in openfl 8.9.1
haxe 4.0.0
Is there any soulution in 2019 to override Movieclip methods that has Object as one of the parameter?
Im trying to override gotoAndPlay, gotoAndStop e.t.c
HTML5 target works fine, but Flash has runtime error
flash.utils.Object does not work. It seems compiles to *
Error trace:
[trace] param 1 incompatible
[trace] virt Object flash.display::MovieClip/gotoAndStop()
[trace] over * gafplayer.display::GafDisplayObject/gotoAndStop()
[Fault] exception, information=VerifyError: Error #1053: Illegal override of GafDisplayObject in gafplayer.display.GafDisplayObject.