openfl

Where to put drawable resources for an OpenFL android extension?

霸气de小男生 提交于 2019-12-07 18:16:38
问题 I am making an android extension for my OpenFL app, which is supposed to show a notification, when I call a function from Haxe. I need to put a drawable icon in my extension project, because a notification requires an icon. However, the Java file extends an "Extension" class, which provides the object - Extension.assetManager (android.content.res.AssetManager) How do I use this to access a drawable similar to R.drawable....? And also where to put drawable resources for the OpenFL android

FlashDevelop/OpenFL: How to set default target to neko

二次信任 提交于 2019-12-06 16:48:51
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

Where to put drawable resources for an OpenFL android extension?

☆樱花仙子☆ 提交于 2019-12-05 21:09:03
I am making an android extension for my OpenFL app, which is supposed to show a notification, when I call a function from Haxe. I need to put a drawable icon in my extension project, because a notification requires an icon. However, the Java file extends an "Extension" class, which provides the object - Extension.assetManager (android.content.res.AssetManager) How do I use this to access a drawable similar to R.drawable....? And also where to put drawable resources for the OpenFL android extension? It looks like AssetManager can access files in the "assets" folder, so I suspect what you need

How to exit Haxe/OpenFL program?

这一生的挚爱 提交于 2019-12-04 04:05:11
I am making a game using Haxe, OpenFL (Formerly NME) and HaxeFlixel. However, problem is, I can't seem to find a good way to make a Flixel button that will shutdown the game when pressed. I was planning to make a "quit" button on the main menu. Is there any simple method to do so or is it impossible? It depends on the compilation target: I'm going to assume you're compiling to CPP (Windows EXE). In which case you should just be able to use the following: import flash.system.System; // Or nme.system.System if you're using NME ... // in your FlxButton callback: System.exit(0); I can't test right