[ create a new paste ] login | about

Link: http://codepad.org/2YhdhZxF    [ raw code | fork ]

Plain Text, pasted on Mar 3:
package{
	import flash.display.*;
	import flash.utils.Timer;
	import flash.events.*;
	import flash.ui.Mouse;
	
	public class circle extends MovieClip{
		
		
		
		public function circle(){
			
			this.graphics.beginFill(0xFF00FF);
			this.graphics.drawCircle(mouseX,mouseY,20);
			this.graphics.endFill();
			var timer:Timer = new Timer(10);
			timer.addEventListener(TimerEvent.TIMER,tick);
			timer.start();
			
		}
		
		private function tick(temp:TimerEvent){
			
			this.alpha -= 0.01;
			if(!alpha)
				parent.removeChild(this);
			
		}
	}
}


Create a new paste based on this one


Comments: