# I need help with Tween Scripting

**URL:** <https://forum.kirupa.com/t/i-need-help-with-tween-scripting/215573>\
**Category:** Uncategorized\
**Created:** [February 8, 2007, 9:36am UTC](https://forum.kirupa.com/t/i-need-help-with-tween-scripting/215573 "2007-02-08T09:36:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![designursite](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/designursite/32/2209_2.png) [@designursite](https://forum.kirupa.com/u/designursite)\
**Post date:** [February 8, 2007, 9:36am UTC](https://forum.kirupa.com/t/i-need-help-with-tween-scripting/215573/1 "2007-02-08T09:36:08Z")

</div>

**Hi,**

**I have created 5 buttons and i want the to move to the bottom, if you check the fla its below the line i created.**

**This is what i want:**

**In the begining the ‘home button’ must be pressed automatically and it should be written “Home is pressed”, but when i click and release the ‘about us’ button i want the ‘home button’ to elastically move to the ‘about us’ x and y coordinates and the ‘about us button’ to the x and y corodinates of the ‘home button’ button. I hope you understood till this point.**

**I also want the buttons to be disabled once they reach below the line.**

**This is the code i kept in the first Frame:**

```auto

 
home_mc.home_btn.onRelease = function() {
 page_txt.text = "Home is Pressed";
 home_mc.home_btn.enabled = false;
}
about_mc.about_btn.onRelease = function() {
 page_txt.text = "Aboutus is Pressed";
 home_bounce();
 about_bounce();
}
function home_bounce() {
 new mx.transitions.Tween(home_mc, "_x", mx.transitions.easing.Elastic.easeOut, 275, 275, 3, true);
 new mx.transitions.Tween(home_mc, "_y", mx.transitions.easing.Elastic.easeOut, 190, 153, 3, true);
}
function about_bounce() {
 new mx.transitions.Tween(about_mc, "_x", mx.transitions.easing.Elastic.easeOut, 275, 275, 3, true);
 new mx.transitions.Tween(about_mc, "_y", mx.transitions.easing.Elastic.easeOut, 153, 190, 3, true);
}
 
 

```

**I want it same with the others 3 buttons, i tried to use the if statement but it does’nt work with me.**

**Please if someone can spend some time in this, i would appericiate it.**

**Thanks,**  
**Regards.**
