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: forked from: forked from: testing aje

Get Adobe Flash player
by hacker_9h3e713z 13 Feb 2009
    Embed
// forked from hacker_9h3e713z's forked from: forked from: testing aje
// forked from hacker_9h3e713z's forked from: testing aje
// forked from hacker_9h3e713z's testing aje
// forked from hacker_9h3e713z's forked from: forked from: forked from: forked from: forked from: forked from: forked from: flash on 2009-2-12
// forked from hacker_9h3e713z's forked from: forked from: forked from: forked from: forked from: forked from: flash on 2009-2-12
// forked from hacker_9h3e713z's forked from: forked from: forked from: forked from: forked from: flash on 2009-2-12
// forked from hacker_9h3e713z's forked from: forked from: forked from: forked from: flash on 2009-2-12
// forked from hacker_9h3e713z's forked from: forked from: forked from: flash on 2009-2-12
// forked from hacker_9h3e713z's forked from: forked from: flash on 2009-2-12
// forked from hacker_9h3e713z's forked from: flash on 2009-2-12
// forked from hacker_9h3e713z's flash on 2009-2-12
package {
    import flash.display.Sprite;
    import flash.display.MovieClip;
    import flash.events.Event;
    
    public class FlashTest extends MovieClip
    {
        private var diameter:Number = 0;
        public function FlashTest() 
        {
            // write as3 code here..
           
	    addEventListener(Event.ENTER_FRAME,createParticles);
	}
		
        private function createParticles(evt:Event):void
        {
            var pointer:MovieClip = new MovieClip();
            drawCircle(pointer);
            pointer.x = Math.random()*500-150;
            pointer.y = Math.random()*500-150;
            //pointer.x = -150;
            //pointer.y = -150;
            pointer.addEventListener(Event.ENTER_FRAME,particleMove);
            addChild(pointer);
        }

	private function drawCircle(mc:MovieClip):void
	{
                var d:Number = Math.random()*50;
		mc.graphics.lineStyle(10,0x333333,1);
		mc.graphics.drawCircle(150,150,d/2);
	}
        private function particleMove(evt:Event):void
	{
                var diffX:Number = (mouseX-150)-evt.target.x;
                var diffY:Number = (mouseY-150)-evt.target.y;
                evt.target.x += diffX/(diffY/100)*16;
                evt.target.y += diffY/(diffY/100)*16;
                evt.target.alpha -= .05;
                if (evt.target.alpha<0)
                {
                    evt.target.parent.removeChild(evt.target);
                }
	}       
    }
}