-
Simple, I hope :)
Currently I have a FLA that plays a seriers of images. i am using stop(); and a next button with on(release){ play(); }. The next button is always displayed and when an image flows onto screen the stop(); action will hault the movie. The user needs to click next to go to the next slide - this all works fine.
My question is how would I incorporate a rewind button? Basically just looking to hop back to the previous image.
Any help appreciated.
Thanks,
Kerry
-
If the images are on the time line, give each image a frame label as "img1", "img2" ...
Then put "rewind" and "next" buttons on another layer in the same movie as the image.
In the first frame of timeline put:
var currentImage = 1;
var totalImage = (number of image you have);
Code for next:
on(release) {
if (currentImage < totalImage) {
gotoAndStop("img" + currentImage);
currentImage ++;
}
}
code for rewind:
on(release) {
if (currentImage > 0) {
gotoAndStop("img" + currentImage);
currentImage --;
}
}
Same principle for the loaded images
-
Can you e-mail me directly so I can show you what I am referring to? My e-mail is kerry.corcoran@molex.com
-
Skill_Unabletospell_guy
the easyest way would be to use the "nextFrame" and "prevFame" on the buttons
ie.
on(release) {
gotoAndStop(nextFrame);
}
on(release) {
gotoAndStop(prevFrame);
}
good luck
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|