hey guys,
i have a script for my project that exactly does what i want but the only thing missing is i want it to follow the path with ease . that i couldn’t figure out.
here is the code you can copy and past it on the first frame of a flash project and it will work:
var s = _root.createEmptyMovieClip(“circle”, 10);
s._x = 250;
s._y = 200;
s.maxAngle = 3.6;
s.minAngle = -3.6;
s.r = 50;
s.rr = 150;
s.lineStyle(3, 0x8888FF);
s.moveTo(Math.cos(s.minAngle)*s.rr, Math.sin(s.minAngle)*s.r);
for (var i = s.minAngle; i<=s.maxAngle; i += .05) {
s.lineTo(Math.cos(i)s.rr, Math.sin(i)s.r);
}
var d = s.createEmptyMovieClip(“dot”, 10);
d.lineStyle(15, 0x8800);
d.moveTo(0, 0);
d.lineTo(1, 0);
d._x = Math.cos(s._x);
d._y = -s.r;
d.onEnterFrame = function() {
var s = this._parent;
this.onEnterFrame = function() {
this.angle = Math.atan2(s._ymouse, s._xmouse);
this.angle = Math.max(Math.min(this.angle, s.maxAngle), s.minAngle);
this._x = s.rrMath.cos(this.angle)
this._y = s.rMath.sin(this.angle)
}
}
i appriciate if someone help me with that :bounce: