1 Reply Latest reply on Nov 21, 2008 4:07 AM by SujitG

    How can I add a Progress bar to show the "render to JPG" progress?

    Sailorsea21
      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 in advance.