Im working on some kind of puzzle generator.
An image is shown on the left site and chopped into smaller pieces, those smaller pieces needs to become buttons, now the problem
In the swf I load a bitmap
plaatje = BitmapData.loadBitmap("someImage");
Then I copy a part from plaatje in a for loop with:
//fb = plaatje.width & fh = plaatje.height
this["copy"+i] = new BitmapData(fb, fh, true, 0x000000);
//sb & sh are just positions that i need to place
this["copy"+i].copyPixels(plaatje, new Rectangle(rb*sb, rh, sb, sh), new Point(rb*sb, rh));
This al works perfect, BUT… Now i want the copy-ed pixels cropped beqause i want to use it as a button.
Anyone knows how ?