I have created a Orbital menu with 5 items and 5 spacer elements. They are seperated by 36 degrees from each other and can either rotate in either direction all in sync.

Menu function is when you mouseover a linkable item the rotation stops, ( actually I set the rotation speed very slow to where it looks like it has stopped ), This works fine. The next part of the menu function is when you click on a clickable item the rotation speeds up to bring the item to the front of the menu and then stop. This works fine also, the menu items always stop in front.

Here is the problem:

When you click on different items several times the items not brought to the front get out of sync and do not stay at the 36 degree seperation.

Here is the code for one of the menu items which is duplicated for all 5 clickable items.


switch(front)
{
case 1 :
if( (grad <= -268 and grad >= -272) or ( grad >= 88 and grad <= 92))
{
_global.spinRate = _global.slowRate ;
_global.setFlag = false;
}
else
{
if (Number(grad)>=360)
{
grad = 0;
}
if (Number(grad)<=Number(-360))
{
grad = 0;
}
if(_global.setDirection == true)
{
if (Number(getProperty("/follow/dummy", _x))>300)
{
grad = Number(grad)+Number((getProperty("/follow/dummy", _x)-300)/spinRate);
}
else
{
grad = Number(grad)+Number((getProperty("/follow/dummy", _x)-300)/spinRate);
}
}
else
{
if (Number(getProperty("/follow/dummy", _x))>300)
{
grad = Number(grad)+Number((getProperty("/follow/dummy", _x)+300)/spinRate);
}
else
{
grad = Number(grad)+Number((getProperty("/follow/dummy", _x)+300)/spinRate);
}
}
}
break;
default :
if (Number(grad)>=360)
{
grad = 0;
}
if (Number(grad)<=Number(-360))
{
grad = 0;
}
if(_global.setDirection == true)
{
if (Number(getProperty("/follow/dummy", _x))>300)
{
grad = Number(grad)+Number((getProperty("/follow/dummy", _x)-300)/spinRate);
}
else
{
grad = Number(grad)+Number((getProperty("/follow/dummy", _x)-300)/spinRate);
}
}
else
{
if (Number(getProperty("/follow/dummy", _x))>400)
{
grad = Number(grad)+Number((getProperty("/follow/dummy", _x)+300)/spinRate);
}
else
{
grad = Number(grad)+Number((getProperty("/follow/dummy", _x)+300)/spinRate);
}
}
break;
}


What I need is a away to sync the MC's so they keep the 36 degree seperation while in rotation and stopped.

Any help will be most welcome as I have been working on this for a month with no success.

Best regards

Toby