dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: I need to JUMP...

  1. #1
    Senior Member
    Join Date
    Jul 2002
    Posts
    134

    Smile

    Is ther a command that will enable a button to goto previous "Frame Label" or "next frame label"? Instead of previous FRAME next FRAME I have a universal control that I am trying to use throughout a walk through flash demo.
    Am I making sense?
    J

  2. #2
    Poof! Whaddya need? I'mFine's Avatar
    Join Date
    May 2001
    Posts
    345

    well, no, but an idea

    What you could do instead is to take those intervening frames and make them into movie clips. Then the standard nextFrame prevFrame will do what you want.

    For example.. say your first 24 frames are an animation where there's a beach ball that rolls across the scene. Select those 24 frames, and cut them.

    Then insert a new symbol, make sure it's a movie clip, and paste the 24 frames into the timeline of the clip.

    Now go back to your first scene and drag the movie clip into frame 1. Place a stop action in frame 1. Your movie will stop, the beach ball will roll... Then, when your user clicks the "next" button, they will move on to frame 2, where you have another animation in a movie clip.... shouldn't take too long to set up, and will save some time later on.

    --Rissa

  3. #3
    Senior Member
    Join Date
    Jul 2002
    Posts
    134
    Thanks,
    not a bad idea..I may just have to do that. I had thought about going that route at one time but thought I would give this a shot first.
    Thanks for you help,
    Peace,
    J

  4. #4
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    Actually if you named your labels sequentially, you could "jump" easily.

    Let's say your labels are named label1, label2, label3, etc.

    Put this code on your first frame:

    next = 1;
    function nextLabel() {
    gotoAndStop("label"+next);
    next++;
    }
    stop();

    And then on the button you want to click to go forward, put:

    on (release) {
    nextLabel();
    }


    Of course you could easily adapt this to make a "back" button too.

  5. #5
    Registered User
    Join Date
    Nov 2000
    Posts
    94

    prevLabel? nextLabel?

    So how would you adapt the last code here for a prevLabel back button?

    Thanks,

    Jax

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