In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

forked from: convolution_life

pixelDissolveを使ってみた
// forked from hacker_3szp8277's convolution_life
// pixelDissolveを使ってみた
package {
    import flash.display.*;
    import flash.events.Event;
    import flash.filters.ConvolutionFilter;
    [SWF(width=465,height=465,frameRate=120,backgroundColor=0x000000)]
    public class ConvolutionLife extends Sprite {
        public function ConvolutionLife() {
            var field:BitmapData = new BitmapData(465, 465, false, 0);
            var step:ConvolutionFilter = new ConvolutionFilter(3, 3, [1, 1, 1, 1, 9, 1, 1, 1, 1], 0xFF, 0);
            var rule:Array = [0, 0, 0, 0x00FF00, 0, 0, 0, 0, 0, 0, 0, 0x00FF00, 0x00FF00];
            field.pixelDissolve(field, field.rect, field.rect.topLeft, 0, 465*465/2, 0xFF00FF00);
            addChild(new Bitmap(field));
            addEventListener(Event.ENTER_FRAME, function (event:Event):void {
                field.applyFilter(field, field.rect, field.rect.topLeft, step);
                field.paletteMap(field, field.rect, field.rect.topLeft, null, rule, null, null);
            });
        }
    }
}