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

Practice2009-4-23

練習。特に何も起こりません
Get Adobe Flash player
by masika 23 Apr 2009
//練習。特に何も起こりません
package {
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.display.BitmapDataChannel;
    import flash.display.Sprite;
    import flash.events.*;
    import flash.geom.Matrix;
    
import net.hires.debug.Stats;
    
    [SWF(width = "465", height = "465", frameRate = "30", backgroundColor = "#bbbbbb")] 
    public class Practice extends Sprite {
        private var _bmd:BitmapData;
        private var _bmp:Bitmap;
        
        private var _mtrx:Matrix=new Matrix(20,0,10,20,150,150);
           
        public function Practice() {
            init();
            this.addChild(new Stats());
        }

        public function init():void{
        	_bmd=new BitmapData(10,10,true,0xcc333333);
        	//_bmd.noise(10,0,0xFF,BitmapDataChannel.RED,false);
        	
        	_bmp=new Bitmap(_bmd);
        	_bmp.transform.matrix=_mtrx;
        	addChild(_bmp);
        	this.addEventListener(Event.ENTER_FRAME,_entr);
        	
        }
        
        public function _entr(e:Event):void{
        	var num :int=getRandam(100);
        	_bmd.noise(num,0,0xFF,BitmapDataChannel.RED,false);
        }
        
        public function getRandam(num:int):int{
        	return Math.random()*num;
        	
        }
        
    }
}