Hi everyone, I have a button which renders my component to JPG.
How can I attach a progress bar to show the progress of the rendering?

<mx:Button label="render" click="renderasJPEG ()"/>

public function renderasJPEG( ):void
{ 
convertToImage( component001, new JPEGEncoder( 100));
}

private function convertToImage( object:IUICompon ent, 
encoder:IImageEncod er):void
{
var base64string: String = ImageSnapshot. encodeImageAsBas e64(
ImageSnapshot. captureImage( object, 72, encoder));
var variables:URLVariab les = new URLVariables( );
variables.encoded = base64string;
variables.type = "jpeg";
var request:URLRequest = new URLRequest(" script_saveasima ge.php");
request.method = "POST";
request.data = variables;
navigateToURL( request, "_blank");
}

Thanks.

Reply via email to