This is a small demo to show how a client side web application can target both HTML (5) and Flash with the same source code and very minor tweaks.

It uses the mechanism from Domrein Alabaster's example.

HTML 5 Canvas Version Flash 9 Version

I had to make a minor tweak to neash 1.0.3 in my local environment where I wrapped lines 407-408 of /usr/lib/haxe/lib/neash/1,0,3/neash/Lib.hx like so:

#if js
	result.stageX = inMouse.localX / mStage.scaleX;
	result.stageY = inMouse.localY / mStage.scaleY;
	result.stageX = inMouse.x/mStage.scaleX;
	result.stageY = inMouse.y/mStage.scaleY;

I have no idea if that is right, but it gets it to compile. YMMV, this demo doesn't use it.

My demo is also a shell script. Just chmod it 755 and run it. You may have to modify neash if it hasn't been patched yet.

Happy haxe-ing!

@author brianin3d
@date   2010.12.08