paulp75
asked on
when i click button twice it goes to the next frame in movieclip
i've set up a small slide type thing, so i have 3 thumbnails and using arrows on either side it will scroll through
i have this script on the next button
on (release) {
nextFrame();
}
and this one on the previous
on (release) {
prevFrame();
}
and it runs through the frames on the timeline ok. Except for some reason it wants to start at frame 2, even though theres a stop at frame1
anyway the main problem i have is that when i click the thumbnails it directs to the movie
like this
on (release) {
//Movieclip GotoAndPlay Behavior
this.bedroomslides.gotoAnd Play("rene e");
//End Behavior
}
when i click on the thumbnail button, it goes to the correct frame, but if i click on the button again, it goes to the wrong frame.
i have tried using absolutepath aswell but it didnt make any difference.
anyone able to help?
i have this script on the next button
on (release) {
nextFrame();
}
and this one on the previous
on (release) {
prevFrame();
}
and it runs through the frames on the timeline ok. Except for some reason it wants to start at frame 2, even though theres a stop at frame1
anyway the main problem i have is that when i click the thumbnails it directs to the movie
like this
on (release) {
//Movieclip GotoAndPlay Behavior
this.bedroomslides.gotoAnd
//End Behavior
}
when i click on the thumbnail button, it goes to the correct frame, but if i click on the button again, it goes to the wrong frame.
i have tried using absolutepath aswell but it didnt make any difference.
anyone able to help?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
awesome stuff. and thanks for the explaination
that fixed it
any reason when i click on the slide, it takes it to the 2nd frame, instead of the first of the slide.
very strange. can't understand that one.
that fixed it
any reason when i click on the slide, it takes it to the 2nd frame, instead of the first of the slide.
very strange. can't understand that one.
Try changing your "next" button action to this:
on (release) {
if (_currentframe == _totalframes) {
gotoAndStop(1);
} else {
nextFrame();
}
}
-Sam
on (release) {
if (_currentframe == _totalframes) {
gotoAndStop(1);
} else {
nextFrame();
}
}
-Sam
ASKER
i'll put the slide starting at frame 1 in another question. thanks for the answer on the main question.
and great explaining also.
much appreciated
and great explaining also.
much appreciated
gotoAndPlay goes to the frame and plays it. If there's a stop action and YOU ARE NOT on that frame, the stop will catch it.
If you're on the frame, it just plays the timeline because the actions, including stop() have already been ran.
Using gotoAndStop will fix this. You only want to use gotoAndPlay in applications where you actually NEED it to play on from that frame and not stop on it.
-Sam