# Stupid question

**URL:** <https://forum.kirupa.com/t/stupid-question/93431>\
**Category:** Uncategorized\
**Created:** [October 30, 2003, 6:54pm UTC](https://forum.kirupa.com/t/stupid-question/93431 "2003-10-30T18:54:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![monkeygirl](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@monkeygirl](https://forum.kirupa.com/u/monkeygirl)\
**Post date:** [October 30, 2003, 6:54pm UTC](https://forum.kirupa.com/t/stupid-question/93431/1 "2003-10-30T18:54:31Z")

</div>

Hi all,  
Okay, I know this is a stupid question, but I cannot figure it out!  
Please help!  
Here’s the simple problem:

I have 3 buttons. And I want them to move to a different position (gradually, not jump there) when one of them is clicked.  
I wrote a function that is called whenever one of the buttons is clicked. The problem is that, the positions of the buttons only change by 5 pixels every time i click one of them. how do I make it so that, when i click one of them, they automatically move to the right positions? Thanks!

//  
function buttonTrigger() {  
if (\_root.cSchool.\_y\<700) {  
\_root.cSchool.\_y = \_root.cSchool.\_y-5;  
\_root.cPro.\_y = \_root.cPro.\_y+5;  
\_root.cPer.\_y = \_root.cPer.\_y+5;  
} else {  
\_root.cSchool.\_y = 300;  
\_root.cPro.\_y = 700;  
\_root.cPer.\_y = 700;  
}  
}  
//this function is called here  
on(release){  
this.buttonTrigger();  
}
