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: flash on 2010-3-25

Get Adobe Flash player
by uwi 26 Mar 2010
/**
 * Copyright uwi ( http://wonderfl.net/user/uwi )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/myv3
 */

// forked from kiyobu's flash on 2010-3-25
package {
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.display.Shape;
    import flash.display.BlendMode;
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    public class FlashTest extends Sprite {
    		private var _bmd : BitmapData;
    		private var _s : Shape;
    	
    		//public var bmp:Bitmap;
        public function FlashTest() {
            // write as3 code here..
            _s = new Shape();
            addEventListener(Event.ENTER_FRAME, loop);
            
            _bmd = new BitmapData(465, 465, false, 0x000000);
            addChild(new Bitmap(_bmd));
        }
        public function loop(e:Event):void {
        		_s.graphics.clear();
            _s.graphics.lineStyle(1,0x03070f,1);
            for(var i : uint = 0;i < 30;i++){
		        _s.graphics.moveTo(0,Math.random() * 465);
		        _s.graphics.lineTo(465,Math.random() * 465);	
            }    
            
        		_bmd.lock();
	        _bmd.draw(_s, null, null, _ct % 20 < 10 ? BlendMode.ADD : BlendMode.SUBTRACT);
	        _bmd.unlock();
	        
	        _ct++;
        }
        
        private var _ct : uint = 0;
    }
}