# 3D rotating menu

**URL:** <https://forum.kirupa.com/t/3d-rotating-menu/173191>\
**Category:** flash\
**Created:** [December 22, 2005, 5:31am UTC](https://forum.kirupa.com/t/3d-rotating-menu/173191 "2005-12-22T05:31:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![deltajam](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@deltajam](https://forum.kirupa.com/u/deltajam)\
**Post date:** [December 22, 2005, 5:31am UTC](https://forum.kirupa.com/t/3d-rotating-menu/173191/1 "2005-12-22T05:31:30Z")

</div>

I have the following code placed on 3 movieclips:

```auto
 
[left]onClipEvent(load){
y=0;
speed=3;
radius=150;
xcenter=275;
ycenter=150;
zcenter=100;
angle=60;
fl=450;
}

onClipEvent(enterFrame){
z=Math.sin(angle*Math.PI/180)*radius+zcenter;
scale=fl/(fl+z);
x=Math.cos(angle*Math.PI/180)*radius;
_x=x*scale+xcenter;
_y=y*scale+ycenter;
_xscale= _yscale = scale*100;
_alpha=scale*100;
angle+=speed;
if(angle>359){
angle-=360;
}
}[/left]

```

How would I add buttons and have it only rotate when I click the movieclips button? So there would be 3 buttons and 3 movieclips, with the only animation happening when you click a button to bring the movieclip to the front. Any ideas?
