Grimace is a free Flash-based web component which displays emotions through facial expressions of a comic-like face. It is based on the idea that the face can serve as an accurate representative of emotional information, which is difficult to express verbally.

The face is simple yet highly expressive and can represent subtle emotional changes through arbitrary blending of 6 basic emotions.  Delivered as a lightweight SWF file, Grimace can be conveniently integrated into your own project using Javascript, Flex, Flash IDE or pure Actionscript. Configuration entirely takes place through external XML-based files, which allow full customization.

Sample

// API:
capture(format:String = "PNG"):void
draw():void
getEmotion():Object
getMaxBounds(scaled:Boolean = true):Object
getPosition():Object
isReady():Boolean
loadFacedata(urls:Array, urlPrefix:String = ""):void
resetEmotion(fadeTime:Number = 0):void
restart():void
setCaptureUrl(url:String):void
setEmotion(emotionSet:Object, fadeTime:Number = 0):void
setMaxBounds(maxWidth:Number = 0, maxHeight:Number = 0):void
setPosition(x:Number, y:Number):void
setScale(scale:Number):void
setScaleMode(mode:String = "noScale"):void

// Usage
public var grimace:*;

[Embed(source="/grimace/grimace.swf", mimeType="application/octet-stream")]
private var grimaceClass:Class;

public function Embed() {
  var grimaceBytes:ByteArray = (new grimaceClass() as ByteArray);
  var ldr:Loader = new Loader();
  ldr.loadBytes(grimaceBytes, new LoaderContext(false, ApplicationDomain.currentDomain));
  var scope:* = this;
  ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, function():void {
    scope.init(ldr.content);
  });
}

public function init(grimace:*):void {
  this.grimace = grimace;
  addChild(grimace);

  // now you can access all API methods
}
Misc . URL.