I'm building a game using the HaxeFlixel lib. In one part of my code I'm dynamically resolving classes via Type.resolveClass()
. In order to avoid having to reference every potential class individually, I tried to use --macro include()
by adding this to my project.xml
:
<haxeflag name="--macro" value="include('my.pack')" />
This worked fine when compiling against the Flash target, but when I try to compile against neko I get:
C:\HaxeToolkit\haxe\lib\flixel/3,0,4/flixel/FlxG.hx:3: characters 7-34 : You can not access the flash package while targeting neko (for flash.display.DisplayObject)
C:\HaxeToolkit\haxe\lib\flixel/3,0,4/flixel/FlxSprite.hx:3: characters 7-18 : referenced here
source/objects/enemies/Bat.hx:3: characters 7-23 : referenced here
--macro:1: character 0 : referenced here
It looks like the include macro is recursively including everything that my classes imported, including stuff that isn't appropriate for the neko target. Is there a way around this problem?