# Need help with a rotating nav :(

**URL:** <https://forum.kirupa.com/t/need-help-with-a-rotating-nav/220172>\
**Category:** Uncategorized\
**Created:** [March 23, 2007, 1:04pm UTC](https://forum.kirupa.com/t/need-help-with-a-rotating-nav/220172 "2007-03-23T13:04:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lewisyoung](https://avatars.discourse-cdn.com/v4/letter/l/e19b73/32.png) [@lewisyoung](https://forum.kirupa.com/u/lewisyoung)\
**Post date:** [March 23, 2007, 1:04pm UTC](https://forum.kirupa.com/t/need-help-with-a-rotating-nav/220172/1 "2007-03-23T13:04:42Z")

</div>

hello

i have posted on a similar subject to this a while ago - but have now made some progress, horay!

the nav i am working with can be seen here:  
[http://www.visualrythm.com/nav\_testfile.swf](http://www.visualrythm.com/nav_testfile.swf)

and the source here:  
[http://www.visualrythm.com/nav\_testfile.fla](http://www.visualrythm.com/nav_testfile.fla)

what i got is a nav that spins naturally, pauses when i roll over it - and flips to the top when clicked.

what im ideally trying to get it to do is,

firstly to slow to a pause when rolled over - and speed back up when rolled out. (this isnt vital tho!!)

the second thing i want it to do is to rotate to the top instead of jumping up there. (this is vital!!)

the last thing i need it to do is to jump to a marker when it gets to the top (but that wont be hard)

any tips on any of these would be ace!

## here is the script on the wheel at the moment:

child = 0;

[COLOR=DimGray]/_countup.onEnterFrame = function() {  
this.timer = int(0+(getTimer())/1000);  
child += 0.5;  
};_/

[COLOR=Black]countup.onEnterFrame = function() {  
this.timer = int(getTimer()/1000);  
};[/COLOR]

/\*  
max = object.length;  
i = 0;  
var i = 0;  
max = object.length;

while (i \< max) {  
navigation.push(++i);  
}  
trace(navigation.join());

Movieclip.prototype.circle = function (number, angle, xpos, ypos, radius, depth, xmulti, ymulti) {  
var gFactor = angle/number;  
for (var i = 0; i \< angle; i += gFactor) {  
attachMovie(\_root.navigation[i], \_root.navigation[i]+depth, depth);  
this[\_root.navigation[i]+depth].\_x = xpos+radius_Math.cos(i_Math.PI/180_xmulti);  
this[\_root.navigation[i]+depth].\_y = ypos-radius_Math.sin(i_Math.PI/180_ymulti);  
depth++;  
}  
};

Movieclip.prototype.kill = function (depth) {  
for (var i = 0; i);  
}  
};  
\*/[/COLOR]  
speed = 1;  
onEnterFrame = function () {  
if (top == “section1”) {  
nav.\_rotation = 0;  
} else if (top == “section2”) {  
nav.\_rotation = -72;  
} else if (top == “section3”) {  
nav.\_rotation = -144;  
} else if (top == “section4”) {  
nav.\_rotation = -216;  
} else if (top == “section5”) {  
nav.\_rotation = -288;  
} else {  
nav.\_rotation += speed;  
}  
};  
\_root.nav.circle.section1.onRollOver = function() {  
speed = 0;  
};  
\_root.nav.circle.section1.onRollOut = function() {  
speed = 1;  
};  
\_root.nav.circle.section1.onRelease = function() {  
top = “section1”;  
};

\_root.nav.circle.section2.onRollOver = function() {  
speed = 0;  
};  
\_root.nav.circle.section2.onRollOut = function() {  
speed = 1;  
};  
\_root.nav.circle.section2.onRelease = function() {  
top = “section2”;  
};

\_root.nav.circle.section3.onRollOver = function() {  
speed = 0;  
};  
\_root.nav.circle.section3.onRollOut = function() {  
speed = 1;  
};  
\_root.nav.circle.section3.onRelease = function() {  
top = “section3”;  
};

\_root.nav.circle.section4.onRollOver = function() {  
speed = 0;  
};  
\_root.nav.circle.section4.onRollOut = function() {  
speed = 1;  
};  
\_root.nav.circle.section4.onRelease = function() {  
top = “section4”;  
};

## \_root.nav.circle.section5.onRollOver = function() { speed = 0; }; \_root.nav.circle.section5.onRollOut = function() { speed = 1; }; \_root.nav.circle.section5.onRelease = function() { top = “section5”; };

[COLOR=Black]  
NOTE: grey text is commented out, this script is just things being played with but not working right!  
[/COLOR]  
any help would be great.

L
