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 Susisu's 読み込み中っぽいもの
package {
    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.text.TextFormat;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            var spin:Spin=new Spin();
            spin.x=465/2;
            spin.y=465/2;
            addChild(spin);
            var tf:TextField=new TextField();
            var format:TextFormat=new TextFormat(null,16,0x808080,true,false,false,null,null,"center");
            tf.text="Loading...";
            tf.setTextFormat(format);
            tf.width=465;
            tf.y=465/2+40;
            addChild(tf);
        }
    }
}
import flash.display.Sprite;
import flash.display.Shape;
import flash.events.Event;
class Spin extends Sprite{
    private var balls:Vector.<Shape>=new Vector.<Shape>();
    private var r:Number=0;
    public function Spin(){
        for(var i:uint=0;i<8;i++){
            var ball:Shape=new Shape();
            ball.x=Math.cos(2*Math.PI/8*i)*16;
            ball.y=Math.sin(2*Math.PI/8*i)*16;
            ball.graphics.beginFill(0x808080);
            ball.graphics.drawCircle(0,0,4);
            ball.graphics.endFill();
            ball.alpha=(Math.sin(2*Math.PI/8*i-r)+1)/2;
            addChild(ball);
            balls.push(ball);
        }
        addEventListener(Event.ENTER_FRAME,onEnterFrame);
    }
    private function onEnterFrame(e:Event):void{
        for(var i:uint=0;i<8;i++){
            balls[i].alpha=(Math.sin(2*Math.PI/8*i-r)+1)/2;
        }
        r+=Math.PI/15;
    }

}