Take snap shot of chart using flex 3 and php

Objective: Need to create a snapshot from flex, what would you do. Solution: Make any canvas or vbox or hbox as a base64encodeded string using flex commands, and pass it server script. on server script decode the base64 string that you have received. Image.mxml import mx.graphics.ImageSnapshot; import mx.core.UIComponent; public function getBase64String(component:UIComponent):void { var urlRequest:URLRequest = [...]