Hi,
I am not sure how to do it with a motion guide but I can achieve this effect with Actionscript. Math.sin and Math.cos are perfect for circular rotation. Math.atan can be used to determine the angle position from the mouse. However, if you dont have a good understanding of actionscript, this might seem a little confusing. Paste this code sample onto the first frame of a new movie and test......no movieclips are necessary. This effect is created dynamically with Actionscript....
Code:
var s = _root.createEmptyMovieClip("circle", 10);
s._x = 250;
s._y = 200;
s.maxAngle = 3.6;
s.minAngle = -3.6;
s.r = 150;
s.lineStyle(3, 0x8888FF);
s.moveTo(Math.cos(s.minAngle)*s.r, Math.sin(s.minAngle)*s.r);
for (var i = s.minAngle; i<=s.maxAngle; i += .05) {
s.lineTo(Math.cos(i)*s.r, 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.r*Math.cos(this.angle);
this._y = s.r*Math.sin(this.angle);
}
}
hope it helps
NTD
Bookmarks