I’m making a slide show in flash (currently MX, but I may be upgrading within the month).
It’s fairly simple at the moment - just using motion tweens to fade between the pictures.
On the main movie, I only have the first frame, which holds two layers (Images, and Navigation)
On the images layer, I have a movieclip which contains the slideshow.
Instead of adding a bunch of frames to ‘pause’ over an image, I used the setInterval command, which calls a pause funcion (will show code later), since this seems an easier way to navigate backwards and forwards.
My problem is that when I hit pause when the image frame is fully loaded (therefore the setInterval command is beginning to go into effect), it will not pause.
I’ve tried a few different ways; none of which seem to work. I decided to go back to my most basic code, since the others didn’t work either. This is my current code:
pause function:
function pause(){
if (pausetoggle != true){
play();
clearInterval(timer);
}}
On pausing frames:
stop();
timer = setInterval(pause, 1000);
Pause button:
on (release) {
mov_images1.stop();
clearInterval(timer);
pausetoggle = true;
}
Play button:
on (release) {
var pausetoggle = false;
mov_images1.play();
}
It seems as though this should work –
I have tried 1 and 0 instead of true and false, other if statements in the pause function, and a few other roundabout ways. If anyone could help me figure out this problem, I would really appreciate it. It’s probably something stupid - that is almost always my problem when doing code.
Thanks you for your time! =)