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

じょじょにブレていく(謎

Get Adobe Flash player
by Saqoosha 15 Dec 2009
/**
 * Copyright Saqoosha ( http://wonderfl.net/user/Saqoosha )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/75cN
 */

package {
    import flash.display.Sprite;
    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();
        }
    }
}