I have the following script on a button. Which tells it once pressed to go to a frame label and play an animation.
The problem being whenever i roll out it plays the animation which i have done to do when the mouse rolls out the roll out. This is fine when you dont click the button. However, when you do click the button it plays the right animation untill you roll out it goes back to the roll out animation instead of the mouse press animation i want it to go.
on (rollOver) {
gotoAndPlay(“wedding_camstart”);
}
on (rollOut) {
gotoAndPlay(“wedding_camfinish”);
}
How about this. Is there anyway of saying onRoll out goto play the rollOut animation(framelabel). UNLESS pressed goto pressed button animation(framelabel)?
Here is alittle more detail so hope someone can help.
Basicly its fine when you roll over plays animation(framelabel) and rolls out plays animation (framelabel) fine. However when i click the button it plays the next animation framelabel which is the start of a new page fine.
However once i rollout again it goes back and plays the roll out animation and put me back where i started. Basicly i need to tell it roll out unless pressed; if pressed go to the pressed button animation(framelabel) and once you have pressed and rolled out it doesnt play the roll out again. Hope that makes sense.
I’ve put this script together with some help from other people.
on (rollOver) {
if (!pressed) {
gotoAndPlay(“wedding_camstart”);
} else {
gotoAndPlay(“camera_away”);
}
}
on (rollOut) {
if (!pressed) {
gotoAndPlay(“wedding_camfinish”);
} else {
gotoAndPlay(“camera_away”);
}
}
on (release) {
pressed = true;
gotoAndPlay(“camera_away”);
That works however, when you rollover or press it from then on it just plays camera away all the time and you cannot got back to the original, rollover button if you get what i mean.