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();
}