Compressing bitmap data


i'm afraid nothing can given example work, using either jpg encoder or png encoder, whether in <fx:script entity, or in external class.   gives 1 of 2 following errors (based on , how instantiate encoder options object)

 

referenceerror: error #1065: variable flash.display::pngencoderoptions not defined.

and

verifyerror: error #1014: class flash.display::pngencoderoptions not found.

 

/* more verbosely */

referenceerror: error #1065: variable flash.display::pngencoderoptions not defined.

     at classes::pngencoder()[d:\dropbox\work\picturetools-onthemove\picturetools-onthemove-makei t\src\classes\pngencoder.as:12]

     at components::choosepicturebutton/choosepicturelightboxclosed()[d:\dropbox\work\picturetool s-onthemove\picturetools-onthemove-makeit\src\components\choosepicturebutton.mxml:165]

      

here's class i'm using, though represents 1 iterative attempt of dozens , dozens.

package classes

{

     import flash.display.bitmapdata;

     import flash.display.pngencoderoptions;

     import flash.geom.rectangle;

     import flash.utils.bytearray;

 

     public class pngencoder

     {

          public function pngencoder(bmpdata:bitmapdata, png:bytearray, fast:boolean)

          {

               bmpdata.encode(new rectangle(0, 0, bmpdata.width, bmpdata.height), new flash.display.pngencoderoptions(fast), png);

          }

     }

}

 

 

 



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

Warning, the Safe Path is not accessible vm3 - Joomla! Forum - community, help and support

uppercase letters in url - Joomla! Forum - community, help and support

Joomla! Update is not offering Joomla 3 - Joomla! Forum - community, help and support