haxe

How to learn Haxe as a JavaScript developer

梦想的初衷 提交于 2019-12-10 17:37:55
问题 I have been using JS for like 3 years. I want to use OpenFL for making mobile apps. However, I do not know Haxe. And I don't know other programming languages either. However, I am comfortable in learning classes, inheritance, etc.... Also, so far from what I have read, OpenFL is better than Adobe AIR in terms of performance and you need to know Haxe to use OpenFL. So how can I get started? Are there any good resources? All seem to be tailored toward AS3 developers. Do I need to understand

HaxeDevelop debug does not stop on breakpoint

牧云@^-^@ 提交于 2019-12-10 14:23:21
问题 I am new to HaxeDevelop (but experienced with FlashDevelop) and it has essentially no useful documentation that I can find via a Google search. I am trying to get a simple app up and running with OpenFL and Starling. It had an issue so I tried putting a breakpoint. However, it doesn't stop at the breakpoint. I even put several breakpoints in the main class code and it won't stop. I've even tried making a new project with just a main class and a dummy class and it won't breakpoint on this

Using SWF animation in Haxe/OpenFL applications

强颜欢笑 提交于 2019-12-10 13:56:31
问题 As great as Haxe got with NME/OpenFL the big problem transitioning from AS3 development are assets. As much as Haxe is similar to as3 and OpenFL tries to provide a familiar API the lack of SWF support scares away many developers. My research on this topic led me to understand that current SWF is rather weak and buggy with many edits necessary to SWF file in order to run it in Haxe. The question is how do you use SWF animation in OpenFL apps, or if you don't - whats the best solution you've

FlashDevelop and Flash 11 Incubator

喜欢而已 提交于 2019-12-10 10:36:14
问题 How can i start coding Flash 11 using ActionScript3 or Haxe with FlashDevelop? 回答1: Sorry for stupid question, solution was pretty easy. Download Flash 11 Incubator Download FlexSDK 4.5 and extract it somewhere Download flashplayer_inc_playerglobal_022711 Make folder "10.1" inside {FlexSDK}/frameworks/libs/player copy flashplayer_inc_playerglobal_022711.swc into new "10.1" folder and rename file to playerglobal.swc Point FlashDevelop to FlexSDK 4.5 Set Project Target to 10.1 Add this "-swf

Create an instance of a class from a string name in Haxe

孤街浪徒 提交于 2019-12-10 02:56:36
问题 Let's say i acquire the name of a class that i made as a String . How can i Instantiate the class with the name contained in that string? I I know it will be derived from a certain parent class, but the actual class will vary. 回答1: var instance : MyClass = Type.createInstance(Type.resolveClass("path.to.MyClass"), []); Few notes: resolveClass() takes the full path (packages included) of the classe you need createInstance() takes as the second argument an array of values that are applied to the

Meaning of question mark operator '?' before arguments in Haxe

扶醉桌前 提交于 2019-12-08 15:40:25
问题 What is the difference between these two function signatures? function f(?i:Int = 0) {} function f(i:Int = 0) {} It doesn't seem to make any difference whether argument is prefixed with ? , both compile fine. 回答1: There is indeed no reason to use ? in this example, but there is a difference. On a statically typed target, f(null) would not compile since the basic types Int , Float and Bool are not nullable there. However, the ? implies nullability, meaning that function f(?i:Int) is actually

CreateJS + Haxe -> Uncaught ReferenceError: createjs is not defined

三世轮回 提交于 2019-12-08 12:03:46
问题 After a successfull compile of: http://nickalie.com/posts/67 , when I try to see it in the browser, I get a Uncaught ReferenceError: createjs is not defined right here (on the resulting compiled create.js file): var Main = $hxClasses["Main"] = function() { } Main.__name__ = ["Main"]; Main._shape = null; Main._stage = null; Main.main = function() { createjs.Ticker.useRAF = true; Uncaught ReferenceError: createjs is not defined createjs.Ticker.setFPS(60); haxe.Log.trace("hallo~!",{ fileName :

Embeding and reading image assets when deploying to Windows

蹲街弑〆低调 提交于 2019-12-08 08:36:54
问题 In other platforms i could just use something like [Embed(source="logo.gif")] or @:bitmap, but it seems there is no option for that for Windows/Other Cpp platforms. I tried to use the EmbedAssets lib but it's outdated. I also tried using the nmml file resource tag. With this i could get the image as haxe.sys.io.Bytes, but to use i need to convert haxe.sys.io.Bytes to nme.utils.ByteArray. I have not found a way to do this. So, what can i do to embed images on a haxe/nme project when deploying

How to send back to custom class which object of that class was clicked

荒凉一梦 提交于 2019-12-08 03:54:47
问题 I am stack at this problem can't figure out how to do it properly. [Haxe/OpenFL] I want to make following menu. On screen for player display three images/buttons. When player clicks on one of the images/buttons a text with description appears under that button. My is, i dont know how to send from Main (where i create this buttons and using them), send info to custom class of this images/buttons, what specific button/image was pressed. Here is example code, first from custom class of the

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