Rotating Menu
1. Open new document in flash, size 400*300, fps = 50, background black.

2. IMPORTANT - On Publish Settings (Ctrl + Shift + F12), on Flash part, set Flash Player version on Flash Player 6, or this movie will not work.
3. Write links (in this case I'll write 7) one by one, not in one text box.

4. Select all links and align it to the left.
5. Convert all links to Buttons, one by one.

6. Write actionscript for every button.

*put your own adress for every button instead of www.tutorial4me.com
7. Now, again, convert all links, but now in to Movie Clips (F8). Not in one Movie Clip, in 7 Movi Clips, one by one.

8. On root stage, add on every Movie Clip actionscript.
1st Link:
onClipEvent (load) {
hx = 300/2;
hy = 400/2;
r = 100;
a = 30;
function speed(num) {
speedX = -(_root._xmouse-hx)/num;
return speedX;
}
function trans() {
p += speed(40);
range = ((p+72)*Math.PI)/180;
re1 = ((Math.sin(range))*r);
re2 = ((Math.cos(range))*a);
}
function property() {
trans();
_x = hx+re1;
_xscale = _yscale=_alpha=re2+70;
this.swapDepths(_alpha);
}
}
onClipEvent (enterFrame) {
property();
}
2nd Link:
onClipEvent (load) {
hx = 300/2;
hy = 400/2;
r = 100;
a = 30;
function speed(num) {
speedX = -(_root._xmouse-hx)/num;
return speedX;
}
function trans() {
p += speed(40);
range = ((p+144)*Math.PI)/180;
re1 = ((Math.sin(range))*r);
re2 = ((Math.cos(range))*a);
}
function property() {
trans();
_x = hx+re1;
_xscale = _yscale=_alpha=re2+70;
this.swapDepths(_alpha);
}
}
onClipEvent (enterFrame) {
property();
}
and every nex Link is the same, just add 72 on this row:
range = ((p+144)*Math.PI)/180;
1st link is 72
2nd is 144
3rd is
216
4th is 288
5th is 360
6th is 432
7th is 504
ect...
9. OK, you just finished your rotation menu. Test your movie now. You can change button styles if you want.
10. Test our buttons.
11. Search our big tutorial database (right now we have 1713 tutorials) on www.tutorial4me.com. Go to home page. |