Hi,
I'm using Haxe 3.0.1, targetting Flash 10.3 and trying to use a swc library with -swf-lib.
If i only add the library with "-swf-lib lib/framework.swc" it compiles, however the application does not recognize any "protected" variables, functions and properties. It returns me this error:
"[Fault] exception, information=TypeError: Error #1006: alignSite is not a function"
This happens because at runtime alignSite (in AS3 a protected function) the function simply does not exist.
I figure i could use extern classes to map this function and other properties which doesn't seem to appear at runtime and i did this: "haxe -swf nothing.swf --no-output -swf-lib framework.swc --gen-hx-classes" (just like in the haxe site).
After doing this i put the generated files in a classpath for my application to recognize. The extern classes generated also don't have the protected functions / properties, so i edited them manually to include these fields.
But when trying to compile, i receive the following error:
"[Fault] exception, information=VerifyError: Error #1053: Illegal override of onResize"
This is the original onResize function in AS3:
"protected function onResize(event:Event):void {}"
The extern class (this was added to the extern class manually and tested with private and public declarations - both resulted in the same error described above):
"function onResize(event:Event):Void;"
The haxe code which tries to override the function is this (also tried with public and private, same error):
"override function onResize(event:Event):Void {}"
I don't know if there is any step i'm missing, or if i'm doing something wrong, but it seems that using as3 classes with -swf-lib isn't a fully implemented solution yet, since protected declarations just aren't recognized both when using the library itself and when creating extern classes.
Any help would be much appreciated,
Thanks in advance!