A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Simple, I hope :)

  1. #1

    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.

  2. #2
    Senior Member
    Join Date
    Jan 2005
    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

  3. #3
    Can you e-mail me directly so I can show you what I am referring to? My e-mail is kerry.corcoran@molex.com

  4. #4
    Skill_Unabletospell_guy skill_guy101's Avatar
    Join Date
    Dec 2001
    Bristol, UK
    the easyest way would be to use the "nextFrame" and "prevFame" on the buttons
    on(release) {

    on(release) {

    good luck
    I like good music.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center