copy of https://code.google.com/p/flashcanvas/