LiveCoding test 2

by aasdb
♥0 | Line 21 | Modified 2011-06-21 12:22:36 | MIT License
play

ActionScript3 source code

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

package {
    
    import frocessing.display.*;
    [SWF(width="465", height="465", frameRate="60")]
    public class FlashTest extends F5MovieClip2DBmp {
        private var Width:Number = 465;
        private var Height:Number = 465;        
        
        public function FlashTest() {
            super();
        }
        
        public function setup():void {
            size(Width,Height);
            background(0);
            
            colorMode(HSB,255,255,255,255);
            
            noStroke();
        }
        
        public function draw():void {
            fill(map(sin(frameCount/300.0),-1,1,0,255), map(sin(frameCount/10.0),-1,1,0,255),255,40);
            rect(map(sin(frameCount/10.0),-1,1,0,Height), frameCount/10.0%Width,10,10);
        }


    }
}