AS3 bitmap mosaic class
This class will allow you to create a pixellated copy of any display object.
It allows for varying pixel sizes and caching of rendered pixels so you don’t have to redraw them every time.
Usage is as follows:
var myMoz:Mosaic = new Mosaic(yourDisplayObj:DisplayObject, pixelSize:uint, useCache:Boolean);
addChild(myMoz);
or
var myMoz:Mosaic = new Mosaic(yourDisplayObj);
myMoz.pixelSize = 10;
myMoz.render();
Give it a try and let me know what you think.
October 2nd, 2008 at 12:42 am
[...] http://juliankussman.com/blog/2008/10/01/as3-bitmap-mosaic-class/. [...]
October 2nd, 2008 at 1:05 pm
Very cool
November 3rd, 2008 at 9:01 pm
[...] http://juliankussman.com/blog/2008/10/01/as3-bitmap-mosaic-class/ [...]
November 9th, 2008 at 11:15 am
Hello,
Nice job but i have a problem trying to use it in Full Browser. I put a mosaic image in background (full browser), and the image is supposed to resize when i resize my window. It works well but the mosaic image sometimes draw horizontal and vertcal outlines around the mosaics…
Is it normal ? Is it possible to fix it ?
Thank You !
Cédric from Montreal…
[Cedric, your stage scale mode is probably set to EXACT_FIT which is the default. To fix this you should set it to NO_SCALE. Of course after doing that you'd need to listen for a RESIZE event from the Stage and do all your other element's resizing manually through code. Hope this helps - JK]
December 4th, 2008 at 7:35 am
hey there!
I’m trying to use this class but I get this error:
Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
Any help?
Cheers!