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

三角関数uzumaki forked from: [BetweenAS3]uzumaki

前に作ってた「うずまき」のプロパティ変えて遊んだ。
ちょっと変えるだけですごい変わる。
三角関数おもしろー
/**
 * Copyright applicott ( http://wonderfl.net/user/applicott )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/f0dA
 */

// forked from applicott's [BetweenAS3]uzumaki
package{
    import flash.display.Sprite;
    import frocessing.color.ColorHSV;
    import org.libspark.betweenas3.BetweenAS3;
    import org.libspark.betweenas3.easing.*;
    import org.libspark.betweenas3.tweens.ITween;
    [SWF(backgroundColor=0x000000,width=465,height=465)]
    public class uzumaki extends Sprite{
        private const N:uint=5200;
        private var min:Number=19;
        public function uzumaki(){
            for(var i:uint=0;i<N;i++){
                var sp:Sprite = new Sprite;
                sp.graphics.beginFill((new ColorHSV(30+i*0.06,1,1)).toRGB().value);
                sp.graphics.drawCircle(0,0,1.15);
                sp.x = Math.cos(i/180*Math.PI)*(i/16)+stage.stageWidth/2; 
                sp.y = Math.sin(i/180*Math.PI)*(i/16)+stage.stageHeight/2;
                addChild(sp);
                var t:ITween =BetweenAS3.serial(
                    BetweenAS3.to(sp,{x:Math.cos(30*i/180*Math.PI)*(30+i/40)+stage.stageWidth/2,y:Math.sin(30*i/180*Math.PI)*(30+i/40)+stage.stageHeight/2},min,Bounce.easeInOut),
                    BetweenAS3.to(sp,{x:Math.cos(20*i/180*Math.PI*stage.mouseX)*(30+(i/10)*2+stage.mouseY)+stage.stageWidth/2,y:Math.sin(i/180*Math.PI)*(30+(i/10)*2)+stage.stageHeight/2},min,Cubic.easeInOut),
                    BetweenAS3.to(sp,{x:Math.cos(20*i/180*Math.PI*stage.mouseX)*(30+(i/10)*2+stage.mouseY)-stage.stageWidth,y:Math.sin(2.7*i/180*Math.PI)*(30+(i/10)*2)+stage.stageHeight/2},min,Cubic.easeInOut),
                    BetweenAS3.to(sp,{x:Math.cos(10*i/180*Math.PI)*(i/30)+stage.stageWidth/2,y:Math.sin(10*i/180*Math.PI)*(i/30)+stage.stageHeight/2},min/3,Elastic.easeOut),
                    BetweenAS3.to(sp,{x:Math.cos(1*i/180*Math.PI)*(i/12)+stage.stageWidth/2,y:Math.tan(1*i/180*Math.PI)*(i/8)+stage.stageHeight/2},min,Bounce.easeInOut),
                    BetweenAS3.to(sp,{x:Math.cos(1*i/180*Math.PI)*(i/12)+stage.stageWidth/2,y:Math.sin(1*i/180*Math.PI)*(i/12)+stage.stageHeight/2},min,Bounce.easeInOut));
                t.stopOnComplete=false;  t.play();
            }
        }
    }
}