# Mc tween code help

**URL:** <https://forum.kirupa.com/t/mc-tween-code-help/249108>\
**Category:** flash\
**Created:** [January 15, 2008, 3:24pm UTC](https://forum.kirupa.com/t/mc-tween-code-help/249108 "2008-01-15T15:24:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JamesHolder](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@JamesHolder](https://forum.kirupa.com/u/JamesHolder)\
**Post date:** [January 15, 2008, 3:24pm UTC](https://forum.kirupa.com/t/mc-tween-code-help/249108/1 "2008-01-15T15:24:44Z")

</div>

HI

I am trying to make a menu using MC tween code it is working in a roundabout way just need some help with getting it working properly please see link below example of the menu

[http://www.sb-dev.co.uk/stuart/menu.swf](http://www.sb-dev.co.uk/stuart/menu.swf)

If you click on the green tab and after its moved click on the blue tab you will see the problem the code for the menu is below.

```auto

#include "mc_tween2.as"
var tab1Hit:Boolean = false;
var tab2Hit:Boolean = false;
var tab3Hit:Boolean = false;

tab1_mc.onRelease = function () {
    if (tab1Hit) {
    tab1Hit = false;
    tab1_mc.rotateTo(25, 2, "easeinoutback");
    }else {
    tab1Hit = true 
    tab1_mc.rotateTo(60, 2, "easeinoutback");
    }
    
}

tab2_mc.onRelease = function () {
    if (tab2Hit) {
    tab2Hit = false;
    tab1_mc.rotateTo(25, 2, "easeinoutback");
    tab2_mc.rotateTo(20, 2, "easeinoutback");
    }else {
    tab2Hit = true 
    tab1_mc.rotateTo(60, 2, "easeinoutback");
    tab2_mc.rotateTo(50, 2, "easeinoutback");
    }
    
}

tab3_mc.onRelease = function () {
    if (tab3Hit) {
    tab3Hit = false;
    tab1_mc.rotateTo(25, 2, "easeinoutback");
    tab2_mc.rotateTo(20, 2, "easeinoutback");
    tab3_mc.rotateTo(15, 2, "easeinoutback");
    }else {
    tab3Hit = true 
    tab1_mc.rotateTo(60, 2, "easeinoutback");
    tab2_mc.rotateTo(50, 2, "easeinoutback");
    tab3_mc.rotateTo(40, 2, "easeinoutback");
    }
    
}

```
