じょじょにブレていく(謎 Saqoosha forked:3 favorite:5 lines:33 license : MIT License modified : 2009-12-15 13:02:05 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(); } } } Code Fullscreen Preview Fullscreen kuroarizuka _azzip mesulions 178ep3 ish_xxxx toString addEventListener TextFormat text addChild Event.ENTER_FRAME Event Math.random Sprite sort new page view favorite forked pv 414 forked from: じょじょにブレていく(謎 mesulions forked:0 favorite:0 lines:42 ( diff:18 ) pv 293 forked from: じょじょにブレていく(謎 chibichibi forked:0 favorite:0 lines:33 ( diff:3 ) pv 1204 forked from: じょじょにブレていく(謎 178ep3 forked:0 favorite:2 lines:57 ( diff:29 )