haxe

Haxe: How can I make the android menu bar stay hidden

倖福魔咒の 提交于 2020-01-06 05:08:05
问题 Im developing an app using haxe / openfl, with the flashdevelop ide. The default setup for a new project comes with the correctly configured android manifest so that the android menu bars dont show up. However when I touch anywhere on the device they pop up. How can I prevent this from happening. Okay, so I found the the template GameActivity.java file that the system was using to generate the apps code and modified it to include: @Override public void onWindowFocusChanged(boolean hasFocus) {

How to safely store secret key? [closed]

此生再无相见时 提交于 2020-01-06 04:26:09
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . As I have developed my app using openFL which uses haxe, and I am about to start the activation part of my software, I wonder how would I safely store my encryption secret key? would I just hard code it into my app??! I will be using this key to encrypt data before sending to

Cannot import library on Haxe & FlashDevelop

核能气质少年 提交于 2020-01-06 03:20:20
问题 I added some classes through http://lib.haxe.org/ and git with the correct command (haxelib install x) and, while the classes are in the haxe/lib folder, I can't access most of them. Sometimes I'm able to import a library(I get the autocomplete and everything), but when I try to compile it gives me the error Class not found . I searched everywhere and I still don't know how to fix this. I tried to add through Project>Properties>Classpath and I'd even edited the global Classpath but it still

Why is it not possible to access static fields of a class via Type.getClass()?

随声附和 提交于 2020-01-04 03:58:08
问题 In Haxe, it is possible to get the class of an object with the following function: Type.getClass(myObject); If the object myObject is an instance of the class myClass , which contains a static field, I should be able to access this static field: class MyClass { public static myStaticField:Int = 5; } public var myObject = new MyClass(); //expected trace: "5" trace (Type.getClass(myObject).myStaticfield); But the result is: "Class <MyClass> has no field myStaticField." Any idea why? 回答1: You

Using Haxe macro for conditional compilation, instead of #if #end

萝らか妹 提交于 2020-01-02 14:05:13
问题 Suppose we have a Local class with : class Local { static inline public var logLevel:Int = 3; } And some functions : Tool.debug(s:String) // compiled if logLevel >= 0 Tool.moreinfo(s:String)// compiled if logLevel >= 1 Tool.info(s:String) // compiled if logLevel >= 2 Tool.trace(s:String) // compiled if logLevel >= 3 Tool.warn(s:String) // compiled if logLevel >= 4 Tool.err(s:String) // compiled if logLevel >= 5 We can achieve this using -D and some #if in the code. However that implies

Haxe for javascript without global namespace pollution?

故事扮演 提交于 2019-12-31 22:22:52
问题 This question only applies to Haxe version < 2.10 I've known about haxe for a while, but never really played with it until yesterday. Being curious, I decided to port showdown.js, a javascript port of markdown.pl, to haxe. This was pretty straightforward, and the javascript it generates seems to run fine ( edit: If you want to see it in action, check it out here). However, I noticed that the generated code dumps a ton of stuff in the global namespace... and what's worse, it does it by

HaxeNME with smartfox server integration

泪湿孤枕 提交于 2019-12-25 05:13:06
问题 I'm working on a multiplayer game that required the use of Smartfox server, surely I want to start creating the client side in HaxeNME to enable exportation to iphone / android / web at the same time. From my awareness, smartfox only support Flash (and others but not Haxe) client library. So, anyone already working on this can point me to the correct library or direction ? I really don't want to rewrite the client library for Haxe as it's time consuming ? Or should I use other technology to

Conditional compilation inside a method in Haxe

﹥>﹥吖頭↗ 提交于 2019-12-24 15:40:54
问题 In the Haxe programming language, is it possible to detect the target language inside a method definition, as shown here? class Test { static function main() { trace("Hello World !"); #if java trace("This is compiled to Java"); #elseif js trace("This is compiled to Javascript"); } } 回答1: That should work, you only need to add #end after the last trace. 来源: https://stackoverflow.com/questions/13165731/conditional-compilation-inside-a-method-in-haxe

How to run the Haxe server and client example?

匆匆过客 提交于 2019-12-24 12:05:58
问题 I am new to Haxe. I want to try to run the example from here: http://old.haxe.org/doc/flash/chat but I do not know how to run. I just type haxe app.hxml and I have no idea how to continue. Could someone tell me how to run it? 回答1: Running haxe app.hxml creates two files: server.n and client.swf . Double click server.bat (which just starts the server via neko server.n ). Now any number of clients can connect to the server. For testing, just run the client.hx twice with the standalone Flash

Windows cpp target slows down in higher resolutions

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 00:21:24
问题 I'm having some unexpected performance issues with my haxeflixel game when building a windows (cpp) target with the following settings <window if="cpp" width="480" height="270" fps="60" background="#000000" hardware="false" vsync="true" /> I notice that when I'm re-sizing the window to bigger resolutions, or going full-screen up to 1920x1080p, the game becomes slower and lagging. However according to the flixel debug console, the frame rate is the same for all the resolutions. Something even