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

sakuraCursor

色々練習
Get Adobe Flash player
by hacker_cobulht0 16 Dec 2009
package{//色々練習 
    import flash.display.*;
    import flash.events.*;
    import flash.geom.*;

	[SWF(width = "465", height = "465", backgroundColor = 0x000000, frameRate = "60")]

    public class sakuraCursor extends Sprite{
		
        private var container:Sprite;
        private var bmpd:BitmapData;
		private var petalList:Array=new Array();
		private var ck:Boolean;
        private var colorTransform:ColorTransform = new ColorTransform(1,1,1,1,-8,-6,-4);	
		private var _change:Number = 1; 
		private var _radius:Number = 20;		
		private var _angel:Array;
     
   public function sakuraCursor(){init();}

        private function init():void{			
			container = new Sprite();            
            bmpd = new BitmapData(465,465, false, 0xFF000000 );
            addChild(new Bitmap(bmpd));    
			for(var j:int=0; j < 5; j++){
				var _petal:Petal = new Petal(j);				
				petalList.push(_petal);
				container.addChild(_petal);				
			}
			addEventListener(Event.ENTER_FRAME, drawline);
			stage.addEventListener(MouseEvent.MOUSE_MOVE,function(e){ck=true;});
        }

        
		private function drawline(e:Event):void{
			
            bmpd.colorTransform( bmpd.rect, colorTransform );
            bmpd.draw(container);
			
			var chaseCk=petalList[3];
			
			for(var j:int=0; j < 5; j++){
				var dots = petalList[j];				
				if(ck==true){
					var chase=dots._chase;
					dots.x += (mouseX-dots.x) * chase;
					dots.y += (mouseY-dots.y) * chase;
					dots.scaleX=dots.scaleY=.5;
					if(Math.floor(mouseX-chaseCk.x)<=0&&Math.floor(mouseY-chaseCk.y)<=0){ck=false;}
					_angel=[0,70,140,210,280];
					}else if(ck==false){
					var _radian:Number = _angel [j]* Math.PI / 180;
					dots.x = mouseX + _radius * Math.cos(_radian);
					dots.y = mouseY + _radius * Math.sin(_radian);
					dots.scaleX=dots.scaleY=1;
					_angel[j] += _change;
					_angel[j] %= 360;					
				}
			}			
			
        } 
    }
}

import flash.display.Sprite;
import flash.filters.BlurFilter;
class Petal extends Sprite {
	private var arr1=[0xFF6666,0xFF9999,0xFF4775,0xFF4466,0xFF6688];
	private var arr2=[0.2,0.1,0.08,0.08,0.08];
	public var _chase:Number;
	public function Petal(nums:uint):void {		
		_chase=arr2[nums];
		this.graphics.beginFill(arr1[nums]);
		this.graphics.drawCircle(0,0,10);
		this.graphics.endFill();
		this.filters = [new BlurFilter(6,6)];
	}	
}