bHello everyone
I have my project on my website… http://www.sillyplaces.com
Granted many problems to sort out, so i am starting in one area. The rotation of multiple movieclips. Click on the smaller circle, drag up/down and the catagories will rotate round.
Its very slow!!!
The section in my code that does the rotating is in _root.onEnterFrame. Each movieclip is moved up/down an notch at a time within a ‘for’ loop. this loop is within a larger ‘for’ loop depending how many catagories to move up/down. I shall include this section of code for; i hope, better understanding.
My main question is what is the best way to code this? Although i am not experienced with using a motion tween within my code, is this the right method to use?
Is this enough information to help me??
Many Thanks
:o)
_root.onEnterFrame = function() {
with (innerCircle) {
if (dragging or (notches != 0) or (RepeatHowMany > 0)) {
// calculate the angle of the joystick
angle = Math.atan2(_root._ymouse-innerCircle._y, _root._xmouse-innerCircle._x)/(Math.PI/180);
_rotation = angle;
if (notches < -13 or notches > 13) {
angle = 0;
notches = 0;
RepeatHowMany--;
if (RotateClockwise) {
for (var i = 9; i>1; i--) {
_root["Option"+i].txt = _root["Option"+(i-1)].txt;
}
if ((CatagoryPointer-5) >= 0) {
_root["Option1"].txt = CatagoryList[CatagoryPointer-5];
} else {
i = CatagoryList.length - (5-CatagoryPointer);
_root["Option1"].txt = CatagoryList*;
}
CatagoryPointer--;
if (CatagoryPointer < 0) {
CatagoryPointer = CatagoryList.length -1
}
} else { // Counter clockwise
for (var i = 1; i<9; i++) {
_root["Option"+i].txt = _root["Option"+(i+1)].txt;
}
if ((CatagoryPointer+5) < CatagoryList.length) {
_root["Option9"].txt = CatagoryList[CatagoryPointer+5];
} else {
i = (CatagoryPointer+5) - CatagoryList.length;
_root["Option9"].txt = CatagoryList*;
}
CatagoryPointer++;
if (CatagoryPointer >= CatagoryList.length) {
CatagoryPointer = 0;
}
}
} else {
if (RepeatHowMany > 0) {
if (RotateClockwise) {
angle = notches++;
} else {
angle = notches--;
}
} else {
if (angle > 0) {
RotateClockwise = true;
angle = notches++;
} else {
angle = notches--;
RotateClockwise = false;
}
}
}
for (var i = 1; i<=9; i++) {
_root["Background"+i]._rotation = notches+((i*13)-65);
_root["Option"+i]._rotation = _root["Background"+i]._rotation
}
} else {
if (reloadImages and (RepeatHowMany == 0))
{
loadSecondStage();
reloadImages = false;
} // if (reloadImages)
}
}
}; //_root.onEnterFrame = function()