ASCanvas is an implementation of the HTML 5 Canvas element for the Flash environment, written in ActionScript. Older implementations are available supporting Flash 9, however our new code base targets the Flash 10 player and Adobe's asc.jar ActionScript compiler.
This project is now available as a CC 0 / Public Domain resource. It is also available under less liberal licensing; though CC0 allows many provisions for areas in which public domain copyright is not appropropriate.
html:
<canvas id="myCanvas" width="100" height="100"/>
JavaScript and/or ActionScript
var canvas = document.createElement('canvas');
document.body.appendChild(canvas);
var ctx = canvas.getContext('2d');
// Draw shapes
ctx.beginPath();
ctx.arc(75,75,50,0,Math.PI*2,true); // Outer circle
ctx.moveTo(110,75);
ctx.arc(75,75,35,0,Math.PI,false); // Mouth
ctx.moveTo(65,65);
ctx.arc(60,65,5,0,Math.PI*2,true); // Left eye
ctx.moveTo(95,65);
ctx.arc(90,65,5,0,Math.PI*2,true); // Right eye
ctx.stroke();