I am trying to write some cross-language code with Haxe/OpenFL and compile it using FalshDevelop. But I get an error as soon as I use the basic Sys.print
function. A minimal example is as follows:
package;
import flash.display.Sprite;
class Graphic extends Sprite {
public function new () {
super ();
}
static function main() { //used in standalone swf project
Sys.print("Hi");
}
}
It turns out that the default compile command of FlashDevelop is something like:
haxelib run openfl build project.xml flash
,which gives an error on Sys.print
:
Graphic.hx:xx: characters 2-11 : Accessing this field requires a system platform
(php,neko,cpp,etc.)
My guess is that Sys.print
isn't available in the flash target or flash isn't a system platform
(strange). I was wondering if there is way to work around this, and configure FlashDevelop so that the compile command is:
haxelib run openfl build project.xml neko
Thanks