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

何となくぐるぐる

write as3 code here..
Get Adobe Flash player
by mononoahare 22 Dec 2008
    Embed
// write as3 code here..
// write as3 code here..
package{
    import flash.display.Sprite
    import flash.events.Event
    import flash.filters.BlurFilter
    [SWF(width="465", height="465", backgroundColor="0x000000", frameRate="15")]  
    
    public class Main extends Sprite
    {    
        private var container:Sprite
        private var maxNum:uint=40
        private var currentNum:uint
        private var _blur:BlurFilter
        private var particleAr:Array=[]

        public function Main(){
            container=new Sprite()
            container.x=232
            container.y=232
            addChild(container)
            addEventListener(Event.ENTER_FRAME,render)
        }
        
        private function render(e:Event):void
        {
            container.rotationX++
            //container.rotationY++
            container.rotationZ++
             _blur=new BlurFilter(5,5,1)
            filters=[_blur]
            if(currentNum<=maxNum){
                var particle:Particle=new Particle(0,0)
                particleAr.push(particle)
                container.addChild(particle)
                currentNum++
            }
            for(var i:uint=0;i<particleAr.length;i++){
                particleAr[i].update()
            }
        }
    }
    
    
}
    import flash.display.Sprite
    import flash.events.Event
    import flash.filters.BlurFilter
    import flash.filters.ColorMatrixFilter
    class Particle extends Sprite{
         private  var rad:Number=1 
         private var r:Number=5 
         private var _blur:BlurFilter
         private var _color:ColorMatrixFilter
         public function Particle(xpos:Number,ypos:Number){
             graphics.beginFill(0xFFFFFF*Math.random(),1)
             graphics.drawCircle(0,0,5)  
             graphics.endFill() 
             x=xpos
             y=ypos
             
             scaleX=0
             scaleY=0
             alpha=1
         }
         
         public function update():void
         {
             rad=rad+0.5
             r=r*1.04
             
            scaleX=scaleX+0.05
            scaleY=scaleY+0.05
            blendMode="screen"
             x=Math.cos(rad)*r
             y=Math.sin(rad)*r
             
            
            if(scaleX>=5){
               reset()
            }
         }
         
         private function reset():void
         {  
           rad=1 
           r=5 
           x=0
           y=0
           
           scaleX=0
           scaleY=0
           alpha=1
         }
         
    }