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 2011-3-19

Get Adobe Flash player
by Ryogo_Quberey 18 Mar 2011
    Embed
/**
 * Copyright Ryogo_Quberey ( http://wonderfl.net/user/Ryogo_Quberey )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/7U05
 */

package {
    import flash.display.Sprite;
    import flash.display.Bitmap;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import frocessing.core.F5BitmapData2D;
    [SWF(width=465, height=465,backgroundColor=0, frameRate=60)]
    
    public class FlashTest extends Sprite {
        
        private var fb:F5BitmapData2D;
        
        public function FlashTest() {
            // write as3 code here..
            fb = new F5BitmapData2D(465, 465, false, 0);
            fb.noStroke();
            fb.colorMode("hsv", 1.0);
            fb.blendMode = "hardlight";
            addChild(new Bitmap(fb.bitmapData));
            stage.addEventListener(Event.ENTER_FRAME, onEnter);
            stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouse);
            
        }
        private function onEnter(e:Event):void{
        fb.beginDraw();
        fb.fill(Math.random()*0.1, Math.random(), Math.random(), 0.5);
        fb.circle(mouseX, mouseY, Math.random()*30);
        fb.endDraw();
        
        }
        private function onMouse(e:MouseEvent):void{
        fb.bitmapData.fillRect(fb.bitmapData.rect, 0);    
        }
        
        }

    
        
    }