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

ウォシュレット

反省はしていない。
http://ja.wikipedia.org/wiki/%E3%82%A6%E3%82%A9%E3%82%B7%E3%83%A5%E3%83%AC%E3%83%83%E3%83%88
/**
 * Copyright asou_jp ( http://wonderfl.net/user/asou_jp )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/11wu
 */

package 
{
    
    import flash.display.Sprite;
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.events.Event;
    import flash.filters.BlurFilter;
    import flash.geom.ColorTransform;
    import flash.geom.Point;
   
    
    
    
    [SWF(width="465", height="465", frameRate="60")]
    
    /**
     * 反省はしていない。
     * http://ja.wikipedia.org/wiki/%E3%82%A6%E3%82%A9%E3%82%B7%E3%83%A5%E3%83%AC%E3%83%83%E3%83%88
     */
    public class Main extends Sprite 
    {
        
        public function Main():void 
        {        
               
            
            with(graphics)
            {
                beginFill(0)
                drawRect(0,0,465,465);
                endFill();
            }
            
            
            var oshiri:Oshiri = new Oshiri();
            oshiri.x = stage.stageWidth >> 1;
            oshiri.y = stage.stageHeight >> 1
            addChild( oshiri );
            oshiri.y -= 80;
            
            _bitmap = new Bitmap( new BitmapData(465, 465, true, 0) );
            addChild( _bitmap );
            _bitmapData = _bitmap.bitmapData;
            addEventListener( Event.ENTER_FRAME, _enterFrameHandler );
            
        }
        
        private function _enterFrameHandler(e:Event):void
        {
            _create();
            _bitmapData.lock();
            _bitmapData.colorTransform( _bitmapData.rect, new ColorTransform(1, 1, 1, 0.95));
            _bitmapData.applyFilter( _bitmapData,_bitmapData.rect,new Point(), new BlurFilter(5,5,3) );
            
            var len:int = _dots.length;
            for ( var i:int = len-1; i >=0 ; i--)
            {
                var dot:MyPoint = _dots[i] as MyPoint;
                _bitmapData.setPixel32( dot.x, dot.y, dot.color);
                dot.x += dot.xv;
                dot.y += dot.yv;
                dot.xv *= 0.95;
                dot.yv += 0.1;
                if ( dot.y < 145 ) {
                    dot.xv = Math.random() * 16 -8;
                    dot.yv = Math.random() * 5;
                }
                if ( dot.y > 465 ) _dots.splice(i, 1);
            }
            _bitmapData.unlock();
        }
        
        
        private function _create():void
        {
            for ( var i:int = 0; i < _loop; i++ ) 
            {
                _dots.push( new MyPoint() );
            }
        }
        
        private var _loop:int = 30;
        private var _dots:/*MyPoint*/Array = [];
        private var _bitmapData:BitmapData;
        private var _bitmap:Bitmap;
    }
    
}


internal class MyPoint
{
    public function MyPoint()
    {
        xv = Math.random() * 3 - 1.5;
        yv = (Math.random() * -20)-20;
        x = Math.random()*5 + 226;
        y = 485;
    }
    public var color:uint = 0xFFEEEFFF;
    public var xv:Number;
    public var yv:Number;
    public var x:Number;
    public var y:Number;
}


import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.geom.Matrix;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;


internal class Oshiri extends Sprite
{
    private const _SIZE:Number = 100;
    private const LINE_COLOR:uint = 0x666666;
    private var fillColor:uint = 0xf7d4af;
   
   private var fillColorArray:Array = [0xf5e3cf,0xcba273,0xf7d4af];
   
    public function Oshiri():void
    {
        //肌の色
        fillColor = fillColorArray[Math.floor(Math.random()*3)];
               
        with (graphics) 
        {    
            lineStyle( 10, LINE_COLOR );
            beginFill(fillColor)
            drawCircle( -100, -100, 125 );
            endFill()
            beginFill(fillColor)
            drawCircle( 100, -100, 125 );
            endFill()
            lineStyle(0, 0, 0);
            beginFill(fillColor);
            drawRect( -150, -400, 300, 375 );
            endFill();
      
        }
        //ほくろ
        if( Math.random()<0.1 ){
            with(graphics){
                beginFill(0x51412f);
                drawCircle(120,-140,3);
                endFill();
            }
        }

        
    }
}