If i am using actionscript to code (Flash MX 2004) for a circular motion path, and i want to change the radius over a set period of time, how would i do this?
I am using this code from a Kirupa circular movement tutorial:
onClipEvent (load) {
var radius = 100
var speed = 5
var xcenter = this._x;
var ycenter = this._y;
var degree = 0;
var radian;
}
onClipEvent (enterFrame) {
degree += speed;
radian = (degree/180)*Math.PI;
this._x = xcenter+Math.cos(radian)*radius;
this._y = ycenter-Math.sin(radian)*radius;
}
Any help would be appreciated
Rob