Skip to content

Instantly share code, notes, and snippets.

@andyli
andyli / AlphaID.hx
Created April 6, 2010 19:55
HaXe version of AlphabeticID. It translates a numeric identifier into a short string and backwards.
/**
* HaXe version of AlphabeticID
* Author: Andy Li <andy@onthewings.net>
* ported from...
*
* Javascript AlphabeticID class
* Author: Even Simon <even.simon@gmail.com>
* which is based on a script by Kevin van Zonneveld <kevin@vanzonneveld.net>)
*
* Description: Translates a numeric identifier into a short string and backwords.
@andyli
andyli / PerspectiveImage.hx
Created April 9, 2010 13:39
Draw distorted image like perspective transform.
//Ported from the work of Zeh:
//http://zehfernando.com/2010/the-best-drawplane-distortimage-method-ever/
import flash.display.BitmapData;
import flash.display.Graphics;
import flash.geom.Point;
import flash.Vector;
class PerspectiveImage {
/**
@andyli
andyli / Main.cpp
Created June 13, 2010 08:50
To illustrate a hxcpp bug.
#include <hxcpp.h>
#ifndef INCLUDED_A
#include <A.h>
#endif
#ifndef INCLUDED_Main
#include <Main.h>
#endif
#ifndef INCLUDED_haxe_Log
#include <haxe/Log.h>
@andyli
andyli / away3dlite_haxe.hxml
Created September 3, 2010 13:21
away3dlite_haxe.hxml
#use it in terminal:
#haxe away3dlite_haxe.hxml
-swf away3dlite_haxe.swc
-swf-version 10
#the class that contain static function main()
-main Main
@andyli
andyli / Trash.hx
Created October 18, 2010 18:22
A Trash that you can throw unused objects inside and see if they are GC'ed later.
//http://gist.github.com/632717
#if flash9
import flash.utils.TypedDictionary;
import flash.net.LocalConnection;
#else
#error
#end
using Lambda;
@andyli
andyli / Main.hx
Created January 3, 2011 00:05
onthewings.stuffs.stuff2
/**
* Some of the renderings can be found at
* http://www.flickr.com/photos/andy-li/sets/72157625719497466/
*
*
* Copyright (c) 2011, Andy Li http://www.onthewings.net/
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@andyli
andyli / Main.hx
Created January 12, 2011 05:40
onthewings.stuffs.stuff3
/**
* Some of the renderings can be found at
* http://www.flickr.com/photos/andy-li/sets/72157625719497466/
*
*
* Copyright (c) 2011, Andy Li http://www.onthewings.net/
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@andyli
andyli / Main.hx
Created January 18, 2011 04:36
onthewings.stuffs.stuff4
/**
* Some of the renderings can be found at
* http://www.flickr.com/photos/andy-li/sets/72157625719497466/
*
*
* Copyright (c) 2011, Andy Li http://www.onthewings.net/
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@andyli
andyli / Main.hx
Created January 23, 2011 16:05
onthewings.stuffs.stuff5
/**
* Some of the renderings can be found at
* http://www.flickr.com/photos/andy-li/sets/72157625719497466/
*
*
* Copyright (c) 2011, Andy Li http://www.onthewings.net/
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@andyli
andyli / gist:805860
Created February 1, 2011 13:38
Gedit External Tools, compile haXe project
#!/bin/sh
haxe $GEDIT_CURRENT_DOCUMENT_DIR/compile.hxml