需要先修改application.xml,添加
<assets path=”assets” rename=”assets” include=”*” />
然后通过相对路径取得资源,例如
openfl.Assets.getText (“assets/config/config.xml”)[……]
需要先修改application.xml,添加
<assets path=”assets” rename=”assets” include=”*” />
然后通过相对路径取得资源,例如
openfl.Assets.getText (“assets/config/config.xml”)[……]
1、haxe项目入口xml中的haxelib项必须存在,否则项目编译都会失败
2、新项目的项目属性里面,Enable Debugger需要是True,否则无法debug
3、haxelib git有两个参数,第一个是库名,第二个是库地址,大小写敏感
4、AutoVersion的haxe模板Templates\AutoVersion\haXe.fdt需要在inline后加var(?仅haxe3),project-version-versioning style-incrementor中仅只i[……]
Cheat Sheet
It is easy to transition to Haxe from ActionScript. In fact, the Haxe programming language was created by Flash developers. It started with MTASC, the open-source ActionScript 2 compiler, and evolved to the Haxe we love and know today. H[……]
[11:11:18] <me> Who knows where and how to use Lib.current?
[11:13:20] <Herschel> ask away and someone will help 🙂
[11:20:30] <me> I found that I could not show Sprite in stage until I put them in Lib.current when I write AS3 cod[……]
* haxe是亦动亦静的语言。
说它是静态语言,因为它基本是强类型的,声明变量时”var a: Int;”,或者带初始化而省略类型的”var a = 5;”,无论哪种方式,编译器都能确定a的类型,如果省略类型也不赋初值,那么也会在运行时首次赋值确定类型(或编译时?)
说它是动态语言,因为你可以使用对象Dynamic对象,或实现Dynamic接口,在Dynamic对象上,你可以添加新属性,甚至新方法,而haxe是不做类型检查的,而且Dynamic也可以用来和宿主平台传递数据。另外可以用类似js[……]