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

flash on 2009-5-9

1個目 とりあえず 線を引いてみたい
Get Adobe Flash player
by gurumi 10 May 2009
    Embed
// write as3 code here..
//1個目 とりあえず 線を引いてみたい

package
{    
    import flash.display.*;
    import flash.events.*;

    [SWF(frameRate="24", backgroundColor="#000000")]

    public class line_01 extends Sprite
    {
        private var container:Sprite;
        private var dot:Sprite;
        private var bmpd:BitmapData;

        public function line_01()
        {
            init();            
            addEventListener(Event.ENTER_FRAME, drawline);
        }

        private function init():void
        {
            bmpd = new BitmapData(500, 500, true, 0x00FFFFFF);
            container = new Sprite();
            dot = new Sprite();
            addChild(new Bitmap(bmpd));
            container.addChild(dot);
            with(dot.graphics)
            {			
                beginFill(0x0066CC);
                drawCircle(0,0,1);
                endFill();
            }            
        }
        private function drawline(e:Event):void
        {
            bmpd.draw(container);
            dot.x += 1;
            dot.y += 1;
       }  
    }
}