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 2015-10-11

Get Adobe Flash player
by mutantleg 11 Oct 2015
    Embed
/**
 * Copyright mutantleg ( http://wonderfl.net/user/mutantleg )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/qXbC
 */

package {
    import flash.text.TextField;
    import flash.events.Event;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {

        public function FlashTest() {
            
            deb = new TextField();
            deb.width=320; deb.height=240;
            deb.mouseEnabled=false;
            addChild(deb);
            
            
            stage.addEventListener(Event.ENTER_FRAME, onEnter);
        }//ctor
        
        public var deb:TextField;

        public var gt:int = 0;

        public function onEnter(e:Event):void
        {
            graphics.clear();
            graphics.lineStyle(2, 0);
            
            gt += 1;
            
            var ta:Number;            var tb:Number;
            var bx:Number; var by:Number;
            
            ta = (Math.sin(gt *0.1)+1)*0.5;
            tb = (Math.sin(gt *0.1+3.1415)+1)*0.5;
                        
            
            deb.text = ""+ta;
            
            bx = 32 + ta * 32;
            by = 32 + tb * 32;
            
            
            graphics.drawRect(230-bx, 230-by, bx*2, by*2); 
            graphics.drawEllipse(230-bx, 230-by, bx*2, by*2);
            
            
        }//onenter
        
        
    }//classend
}