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

forked from: Nothing is happening??

Get Adobe Flash player
by Hiiragi 02 May 2009
    Embed
// forked from adveractive1124's Nothing is happening??
package {
    import flash.display.Sprite;
    import flash.events.Event;    

    public class Oscillatoin extends Sprite {
        private var _sprite:Sprite;
        private var _angle:Number =94;
        private var _radius:Number =100;
        
        //public function AS3CB(){
        public function Oscillatoin(){
            _sprite = new Sprite();
            _sprite.graphics.beginFill(0x9900ff,100);
            _sprite.graphics.drawCircle(100,100,25);
            _sprite.graphics.endFill();
            _sprite.x=0;
            _sprite.y=100;
            addChild(_sprite);
            addEventListener(Event.ENTER_FRAME,onEnterFrame);
 
        }
        
        public function onEnterFrame(event:Event):void {
            _sprite.x=200 + Math.sin(_angle)*_radius;
            _sprite.y=200 + Math.cos(_angle)*_radius;
            _angle += .05;
        }
   }


 
}