Actionscript 3.0 PSDParser

Can you imagine PSD file can Parser with actionscript. if you think no it is possible with PSDParser. actionscript PSDParser is a great class it can read PDS files its cool. bellow is the sample code


function loadPSDFile( url:String ):void {
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.BINARY;
loader.addEventListener( Event.COMPLETE, onCompleteLoad );
loader.load( new URLRequest( url ) );
}
function onCompleteLoad( e:Event ):void {
var loader:URLLoader = e.target as URLLoader;
var parser:PSDParser = new PSDParser( loader.data );
var layers:Array = layerAndMask.layers;
var pixels:Array = layerAndMask.pixels;
var imageData:PSDImageData = parser.imageData;
var bd:BitmapData;

if ( layers.length > 0 ){
for ( var i:int = 0; i < layers.length; ++i ) {
var layer:LayerStructure = layers[i];
var pixel:LayerPixelData = pixels[i];
bd = pixel.getImage();
}
} else {
bd = imageData.getImage();
}
}


PHP developer Cochin |PHP developer Kerala | PHP developer India | Flash developer/programmer Cochin | Flash developer/programmer Kerala | Flash developer/programmer India | web programmer kerala |web programmer Cochin |web programmer India |web developer kerala |Web developer Cochin | Kerala PHP | PHP freelancer| flash actionscript freelancer