flash - AS3/FP9 - Resize a Sprite -


I have loaded a JPG with a 3264x2448 dimension in a single sprite. I will resize the metro to allow Sprite to attract a bitmap data object (which is limited to 2880 height or width in CS3 / Flash Player 9). My goal is to use Solver [DisplayUtils] [1] to create thumbnails here is the code that works fine with other, smaller, sprites:

  var bmpd: bitmapdata = new bitmapdata (JpgSprite.width, jpgSprite.height, true, 0x00FFFFFF); Bmpd.draw (jpgSprite); Var Thumbs: Bitmap = Displays. Content Thumb (BMPD, 100, 100, Alignment. MIDDLE, True); Add Child (Thumbs);  

Thank you for your suggestions.

I could have a matrix trick to scale it down though I did not test the code is.

  var w: number = 3264; Var h: number = 2448; Var Scale: Number = W / 2880; Var BMPD: bitmapdata = new bitmap data (2880, H / scale, true, 0x00FFFFFF); Var matrix: matrix = new matrix (); Matrix.Sentbox (scale, scale) BMPDDrro (JPPSpritata, matrix);  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -