
This set of libs will make getting swatches from Adobe® Kuler® simple and fast. The klib-as3 is still under development but is being hosted at google codes and the svn has a nice working beta. http://code.google.com/p/klib-as3/
::Example use::
import flash.events.Event;
import com.gfxcomplex.klibas3.services.SwatchData.SearchUserIDSwatches;
var searchUserIDSwatches:SearchUserIDSwatches = new SearchUserIDSwatches(13954);
searchUserIDSwatches.addEventListener(Event.COMPLETE, test);
searchUserIDSwatches.load();
function test(e:Event):void{
trace("::Feed Info::");
trace(searchUserIDSwatches.title);
trace(searchUserIDSwatches.description);
trace(searchUserIDSwatches.managingEditor);
trace(searchUserIDSwatches.recordCount);
trace(searchUserIDSwatches.startIndex);
trace(searchUserIDSwatches.itemsPerPage);
trace("");
for(var i:Number = 0; i < searchUserIDSwatches.swatches.length; i++) {
var swatch:Object = searchUserIDSwatches.swatches[i];
var swatchColors:Array = searchUserIDSwatches.swatches[i].color;
trace("id: " + swatch.id);
trace("title :" + swatch.title);
trace("author :" + swatch.author.name);
trace("link :" + swatch.link);
trace("tags :" + swatch.tags);
trace("downLoads :" + swatch.downLoads);
trace("createdDate :" + swatch.createdDate);
for(var z:int = 0; z < swatchColors.length; z++){
var square:Sprite = new Sprite();
square.graphics.lineStyle(0, 0);
square.graphics.beginFill(swatchColors[z].hex);
square.graphics.drawRect(0, 0, 100, 100);
addChild(square);
square.x = z * 100;
square.y = i * 110;
trace(" ::Color::" + z);
trace(" modes: "+swatchColors[z].mode);
trace(" R :"+swatchColors[z].channelR);
trace(" G :"+swatchColors[z].channelG);
trace(" B :"+swatchColors[z].channelB);
trace(" hex :"+swatchColors[z].hex);
trace(" index :"+swatchColors[z].index);
trace("");
}
trace("");
}
};




