Hello all,
I have a movie clip that moves veritcally along the y-axis when a button is rolled over or out.
It works fine, but I’m having problems modifying it. What I want is for the clip to start moving up on the rollover (which it does currently), but cannot move back down until it has reached the top destination. Despite including the “if” statement it, as soon as the button is rolled-out, the clip starts dropping down no matter where it is along the y-axis… Does anyone know how to control that? Thanks in advance for your help.
Here are the scripts I’m using:
for the movieclip (name is boltgunSlider)
onClipEvent (load) {
this._y = 490;
_root.boltgunSlider.newdest = 490;
}
onClipEvent (enterFrame) {
this._y += (_root.boltgunSlider.newdest-this._y)/3;
}
for the Button
on (rollOver) {
boltgunSlider.newdest = 325;
}
on (rollOut) {
if (boltgunSlider.newdest = 325){
boltgunSlider.newdest = 490;
}
}