You can use the Matrix to get a mirror image like:
_bmpd = new BitmapData(768, 576, false); displayImage.source = new Bitmap(_bmpd); _bmpd.draw(displayImage, new Matrix(-1, 0, 0, 1, _bmpd.width, 0)); --- In [email protected], "christophe_jacquelin" <christophe_jacque...@...> wrote: > > Hello, > > I want to make a vertical mirror on an image <mx:image > id="displayImage" /> > by modifiyng the pixels one by one, but the code is not working. > Could you send me what is wrong: > > Thank you, > Christophe, > > The code > ------------------------------------------------------------- > var data2:BitmapData = Bitmap( displayImage.content).bitmapData; > > var x:int; > var y:int; > var col:uint; > for (x = 0; x < 768; x++) > { > for (y = 0; y < 576; y++) > { > col = data2.getPixel(x, y); > data2.setPixel(x, 576 > - 1 - y, col); > } > } > > displayImage.source = new BitmapAsset(data2); > --------------------------------------------------------- >

