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 keno42 17 Nov 2009
/**
 * Copyright keno42 ( http://wonderfl.net/user/keno42 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/mtUq
 */

package {
    import flash.display.Sprite;
    import flash.events.Event;
    public class FlashTest extends Sprite {
        private var objs:Array=[];
        public function FlashTest() {
            // write as3 code here..
            for(var i:int=0;i<465;i++){
                var obj:Sprite = new Sprite();
                obj.y = i;
                obj.graphics.lineStyle(0, Math.random()*0xFFFFFF);
                obj.graphics.drawRect(0,0,1,1);
                objs.push(obj);
                addChild(obj);
            }
            this.addEventListener(Event.ENTER_FRAME,onEnterFrame);
        }
        private function onEnterFrame(e:Event):void{
            for(var i:int=0;i<465;i++){
                objs[i].x = (objs[i].x+i)%465;
            }
        }
    }
}