Frame 1
this.stop();
this.scene.loadMovie("./scene5b.swf");
SOURCE_MOVIECLIP = this.scene;
RENDER_MOVIECLIP = this.render;
MosaicRect = {x:-40, y:-40, w:80, h:80};
M_WIDTH = 8;
M_HEIGHT = 8;
M_WIDTH_HALF = M_WIDTH / 2;
M_HEIGH_HALF = M_HEIGHT / 2;
bmpData = new flash.display.BitmapData(MosaicRect.w, MosaicRect.h, true);
onEnterFrame = function () {
bmpData.fillRect(new flash.geom.Rectangle(0, 0, MosaicRect.w, MosaicRect.h), 0);
m = new flash.geom.Matrix(1, 0, 0, 1, ((-MosaicRect.x) + SOURCE_MOVIECLIP._x) - RENDER_MOVIECLIP._x, ((-MosaicRect.y) + SOURCE_MOVIECLIP._y) - RENDER_MOVIECLIP._y);
bmpData.draw(SOURCE_MOVIECLIP, m);
var _local2;
var _local1;
var _local3 = new flash.geom.Rectangle(0, 0, M_WIDTH, M_HEIGHT);
_local2 = 0;
while (_local2 < MosaicRect.h) {
_local1 = 0;
while (_local1 < MosaicRect.w) {
_local3.x = _local1;
_local3.y = _local2;
bmpData.fillRect(_local3, bmpData.getPixel32(_local1 + M_WIDTH_HALF, _local2 + M_HEIGH_HALF));
_local1 = _local1 + M_WIDTH;
}
_local2 = _local2 + M_HEIGHT;
}
RENDER_MOVIECLIP.clear();
m = new flash.geom.Matrix(1, 0, 0, 1, MosaicRect.x, MosaicRect.y);
RENDER_MOVIECLIP.beginBitmapFill(bmpData, m, true, true);
RENDER_MOVIECLIP.moveTo(MosaicRect.x, MosaicRect.y);
RENDER_MOVIECLIP.lineTo(MosaicRect.x, MosaicRect.y + MosaicRect.h);
RENDER_MOVIECLIP.lineTo(MosaicRect.x + MosaicRect.w, MosaicRect.y + MosaicRect.h);
RENDER_MOVIECLIP.lineTo(MosaicRect.x + MosaicRect.w, MosaicRect.y);
RENDER_MOVIECLIP.endFill();
};