A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: help with simple gotoAndPlay loop

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Posts
    3

    help with simple gotoAndPlay loop

    Hello! I've been away from Flash for a few years and it's not coming back to me like riding a bike. Looking for some help to create a simple loop animation. I have a 10 frame animation that I would like to play from 1 to 10 and then loop back to 5 and keep looping 5 to 10. I thought a simple frame label at frame 5 and a gotoAndPlay on frame 10 would do it but it doesn't seem to go anywhere.

    frame 5 named loop
    action on frame 10 gotoAndPlay("loop");

    Shouldn't this just go back to 5/loop infinitely? What am I missing? thanks in advance!
    steph

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    It should, you're probably doing something wrong! Provide FLA
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  3. #3
    Junior Member
    Join Date
    Oct 2011
    Posts
    3
    So the actual file has a little more going on than the 10 frames (sorry) but the concept is the same. Play the whole timeline, then loop back to the middle. File attached. thanks!
    Attached Files Attached Files

  4. #4
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    You forgot to put quotes around loop :/

    and you even wrote the correct code in your original post :P
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  5. #5
    Junior Member
    Join Date
    Oct 2011
    Posts
    3
    I had the quotes around it. That didn't work either. Guess the non-quoted one was the last saved version. Did it work for you if you added the quotes? Still not working for me.

  6. #6
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Yes

    Though, I did move the flowers movieclip to the stage!
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

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