Hello!
I have a line (“radie_mc”) rotating when the button “btnPlayPause” is pressed. The line I think as a radius in a circle. I want a circle to be drawn when the radius is rotating. I have a tiny point at the end of the radie called “spets”. I thought that I could curve to that point when the radie is rotating, but that doesn´t work. Can anyone help me with this I would be greatful.
btnText = ["Draw", "Stop"];
// ---------------------------
booPlaying = 0;
// Set default button display
strBtnText = btnText[booPlaying];
// ---------------------------
numRotateRate = 1;
fncRotate = function () {
radie_mc.nRotationValue = (radie_mc.nRotationValue+numRotateRate)%360;
radie_mc._rotation = radie_mc.nRotationValue;
lineStyle(3,0x66,50);
moveTo(_root.radie_mc.spets._x, _root.radie_mc.spets._y);
curveTo(_root.radie_mc.spets._x, _root.radie_mc.spets._y)
trace("_root.radie_mc.spets._x="+_root.radie_mc.spets._x);
};
btnPlayPause.onPress = function() {
if (this._parent.booPlaying) {
// Insert whatever script needed here for action if already playing
clearInterval(this._parent.objRotate);
} else {
this._parent.objRotate = setInterval(this._parent.fncRotate, 5);
}
this._parent.booPlaying = Number(!this._parent.booPlaying);
this._parent.strBtnText = this._parent.btnText[booPlaying];
};