flash on 2011-8-1

by points
♥0 | Line 25 | Modified 2011-08-01 01:39:18 | MIT License
play

ActionScript3 source code

/**
 * Copyright points ( http://wonderfl.net/user/points )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/imo8
 */

package {
    import flash.display.Shape;
    import flash.events.Event;
    import flash.display.Sprite;
    import frocessing.color.ColorHSV;
    public class FlashTest extends Sprite {
        private var theta:Number=0;
        private var color:ColorHSV
        private var shape:Shape;
        public function FlashTest() {
            // write as3 code here..
            color=new ColorHSV();
            color.v=0.1;
            shape=new Shape();
            addChild(shape);
            addEventListener(Event.ENTER_FRAME,loop);
        }
        
        public function loop(e:Event):void {
           color.h=theta;
           theta+=20;
           //
           shape.graphics.beginFill(color.value);
           shape.graphics.drawRect(100,100,200,20);
           shape.graphics.endFill();
        }
    }
}

Forked