A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: button to go ahead or back frames

  1. #1
    Junior Member
    Join Date
    Apr 2007
    Posts
    3

    button to go ahead or back frames

    I'm quite new to flash and am happy with Koolmoves. It's easier to figure out than a couple other programs I've tried, but I'm having trouble figuring out how to do something that seems like it should be so simple. I tried searching, but I'm not even sure what to search for.

    I'm making a slide show with buttons to pause/play, stop, and go back or ahead 1 image which at this time means 2 frames with 14 tweens between each. The pause/play and stop are done. I can't figure out how to make a button have the action of going ahead or back X frames or tweens.

    It's easy to make it go to a certain key frame, and there's a simple option to make it go to the previous or next tween frame, but I need it to go ahead or back 2 frames or 30 tweens.

    I thought maybe on frame 1 have the forward button make it go to frame 3, and on frame 3 have it go to frame 5, etc, but that's not an option because the button can only be told to make the movie go to 1 specific frame and any changes are applied to that button in all frames.

    The only thing I can think of is inserting the same image separately for every frame so each one can be given a different frame to go to, but that would be crazy.

    There must be an action script code that says to go ahead or back X frames or tweens. I'm sure someone here knows what that is and would love to share it.

  2. #2
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    This requires having thought it out at the start to allow for it. What I would suggest is that you put a script on every full image frame that is something like

    if (!playing){
    nextFrame();
    }else{
    stop();
    }

    then in your play button set playing to true and in the stop button set playing to false (could use same button).
    Then in the buttons for Next and Prev just put

    gotoAndPlay(this._currentFrame+1); and
    gotoAndPlay(this._currentFrame-x); where x is the number of tweens you are using so in your case 14

  3. #3
    Junior Member
    Join Date
    Apr 2007
    Posts
    3
    I knew it had to be fairly simple to control a slide show. Thanks

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    There is a built in slide show -- Views > Wizards > Slide Show

  5. #5
    Junior Member
    Join Date
    Apr 2007
    Posts
    3
    I tried it out, but couldn't figure out how to make changes I wanted.

    I got it working now.

    Thanks

  6. #6
    Junior Member
    Join Date
    Jul 2008
    Posts
    25

    Slide Show Wizard Tutorial

    Slide Show Wizard Tutorial

    http://gholagha.parsaspace.com/tutorials/index.html

    Bob Hartzell how do I send my tutorial to you for hosting in support section?
    Last edited by ghol; 08-17-2008 at 01:19 PM.

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