forked from: Nothing is happening??
// 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;
}
}
}