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: じょじょにブレていく(謎

どうしてもやりたくなった・・・。
/**
 * Copyright 178ep3 ( http://wonderfl.net/user/178ep3 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/ascx
 */

// どうしてもやりたくなった・・・。

// forked from Saqoosha's じょじょにブレていく(謎
package {
    import flash.display.Sprite;
    import flash.display.Shape;
    import flash.events.Event;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.text.TextFormat;

    [SWF(width=475, height=475, backgroundColor=0xffffff, frameRate=300)]
    
    public class ScrollMax extends Sprite {

        private var _container:Sprite;
        private var _obj:Sprite;
        private var _tf:TextField;
        
        public function ScrollMax() {
            _container = new Sprite();
            addChild(_container);
            
            _obj = new Sprite();
            _obj.x = 237.5;
            _obj.graphics.beginFill(0xff0000);
            _obj.graphics.drawCircle(0, 0, 100);
            _obj.graphics.endFill();
            _container.addChild(_obj);
            
            _tf = new TextField();
            _tf.defaultTextFormat = new TextFormat('Verdana', 12, 0x0, true);
            _tf.autoSize = TextFieldAutoSize.LEFT;
            addChild(_tf);
            
            addEventListener(Event.ENTER_FRAME, _onEnterFrame);
        }
        
        
        private function _onEnterFrame(event:Event):void {
            _container.y -= Math.random() * 123456;
            _obj.y = -_container.y + 237.5;
            _tf.text = _obj.y.toString();
            if(_obj.y<=-107374182.4)end();
        }
        
          private function end():void
        {
         	removeEventListener(Event.ENTER_FRAME, _onEnterFrame);
        	
         	var ue:Shape = addChild(new Shape())as Shape;
			var st:Shape = addChild(new Shape())as Shape;
			var m:Shape = addChild(new Shape())as Shape;
			var mm:Shape = addChild(new Shape())as Shape;
			m.mask = mm;
			draw(m);
			draw(mm);
			draw(ue,0xff0000);
			draw(st,0xff0000);
			m.x = mm.x = ue.x = st.x = 237.5;
			m.y = ue.y = 150;
			mm.y = st.y = 300;
			function draw(shape:Shape,color:uint=0xffffff):void
			{
				shape.graphics.beginFill(color);
				shape.graphics.drawCircle(0,0,100);
				shape.graphics.endFill();
			}
        }
    }
}