I’m a noob.
I’m used to mxmlc compiling and I’m interested moving over to OpenFl / Haxe. I’m struggling to pass variables during compilation. Previously with mxml I could do something like this:
mxmlc -title MyProject -default-size 1080 1920 -default-frame-rate=30 -default-background-color 0x1c1c1c -swf-version=12 -target-player=10.3 -debug=true -static-link-runtime-shared-libraries=true -o=Rush.swf -use-network=false -define=SWFHEIGHT::swfHeight,1920 -define=SWFWIDTH::swfWidth,1080 -define=XMLPATH::xmlPth,’’ src/MyProject.as
The advantage being, the ability to compile a bunch of SWFs with different sizes and unique variables sequentially.
In my OpenFl .hxproject I’ve got containing width, height, bg color etc. can I overide project variables and pass values during compilation directly the the SWF?
I’m able to use conditions like this:
openfl test flash -Dnamevar=“patrick”
And use it like so, in my code.
txt.text = “HELLO BEN”;
txt.text = “HELLO PATRICK”;
However I’m struggling to do this:
txt.text = "HELLO "+ namevar;
I’m sure the answers to both these questions are easy enough but I’m struggling. Thanks in advance, any tips / links / advise would be so welcome.
Thanks for your time.