Kongregate Avatar Export API (AS3 only)Kongregate's Avatar Export API gives you the ability to export in-game avatars and let users use them as their Kongregate profile avatar.
API FunctionsExporting the Avatar
You can use the submitAvatar(avatar:DisplayObject, callback:Function):void
The callback function must accept a single Example: Exporting a rectangle: var rect:Shape = new Shape(); rect.graphics.lineStyle(1); rect.graphics.beginFill(0x0000FF, 1); rect.graphics.drawRect(0, 0, 75, 50); kongregate.images.submitAvatar(rect, onAvatarComplete); function onAvatarComplete(success:Boolean) { if(success) { trace("That user must love rectangles!") } else { trace("Next time I'll try a triangle :(") } } |