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

CircleRotate:01_02

Get Adobe Flash player
by UNDERCOVER 17 May 2009
    Embed
/**
 * Copyright UNDERCOVER ( http://wonderfl.net/user/UNDERCOVER )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/cG2G
 */

// forked from UNDERCOVER's CircleRotate:01
package {
    import flash.display.Sprite;
    import flash.events.*;
    import flash.geom.*;
    [SWF(width="465", height="465",backgroundColor="#FFFFFF", frameRate=60)] 
    public class FlashTest extends Sprite {
        private var サークル:Sprite;
        private var 角度:int
        private var ラジアン:Number
        private var 半径:int=100
        private var スピード:Number=0
        public function FlashTest() {
         サークル=addChild(new Sprite()) as Sprite
         サークル.graphics.clear()
         サークル.graphics.beginFill(0xFF00000)
         サークル.graphics.drawCircle(stage.stageWidth/2,stage.stageHeight/2,20)
         サークル.addEventListener(Event.ENTER_FRAME,エンターフレーム)
        }
        private function エンターフレーム(e:Event):void{
          角度+=5
          スピード+=0.5 
         半径=Math.cos(スピード*Math.PI/180)*(stage.stageWidth/2-10)     
          ラジアン=Math.PI/180*角度
            x=半径*Math.cos(ラジアン)
          y=半径*Math.sin(ラジアン)
        }
    }
}