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

リングいろいろ

Get Adobe Flash player
by freddy 07 Nov 2011
    Embed
/**
 * Copyright freddy ( http://wonderfl.net/user/freddy )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/ph7k
 */

package {
    import flash.events.Event;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            
            function rotate(event:Event):void {
                event.currentTarget.rotation+=10;
            }

            
            var sp:Sprite = new Sprite();
            sp.graphics.lineStyle(5);
            sp.graphics.drawCircle(0, 0, 50);
            sp.graphics.drawCircle(10, 0, 50 * Math.SQRT1_2);
            sp.x = sp.y = 120;
            addChild(sp);
            sp.addEventListener(Event.ENTER_FRAME, rotate);
            
            sp = new Sprite();
            sp.graphics.lineStyle(0);
            sp.graphics.beginFill(0);
            sp.graphics.drawCircle(0 - 10/3, 0, 50);
            sp.graphics.drawCircle(10 - 10/3, 0, 50 * Math.SQRT1_2);
            sp.y = 120;
            sp.x = 360;
            addChild(sp);
            sp.addEventListener(Event.ENTER_FRAME, rotate);
            
            sp = new Sprite();
            sp.graphics.lineStyle(0);
            sp.graphics.beginFill(0);
            sp.graphics.drawCircle(0, 0, 50);
            sp.graphics.drawEllipse(10, -10, 17, 20);
            sp.x = sp.y = 240;
            addChild(sp);
            sp.addEventListener(Event.ENTER_FRAME, rotate);
            
            sp = new Sprite();
            sp.graphics.lineStyle(5);
            sp.graphics.drawCircle(0, 0, 50);
            sp.graphics.drawCircle(50, 0, 50 * Math.SQRT1_2);
            sp.x = sp.y = 360;
            addChild(sp);
            sp.addEventListener(Event.ENTER_FRAME, rotate);
            
            sp = new Sprite();
            sp.graphics.lineStyle(5);
            sp.graphics.drawCircle(-30, 0, 50);
            sp.graphics.drawCircle(20, 0, 50 * Math.SQRT1_2);
            sp.y = 360;
            sp.x = 120;
            addChild(sp);
            sp.addEventListener(Event.ENTER_FRAME, rotate);
            
        }
    }
}