Flash - how to infinitely repeat a set of frames?

Discussion in 'Software' started by Morgan19, Jul 17, 2006.

  1. Morgan19

    Morgan19 Specialist

    (I did a search for this and didn't come up with anything, so if this has already been asked, I'd love to be pointed in the right direction.)

    I have a Flash animation that, once it's run through it's animation, I'd like to have repeat again from a certain frame until the end and repeat, ad nauseum. For example, it would run normally through frames 1-100 the first time it plays. When it reaches frame 100, I'd like it to start again from frame 50, go to 100, start again at 50 and go to 100, and so on. Can someone help me out with what I assume would be the actionscripting that would accomplish this?

    Thanks,
    m19
     
  2. nrmanby

    nrmanby Private E-2

    you're correct, this is handled by actionscripting.

    Place a keyframe in frame 100. Type the script:

    gotoAndPlay(50);


    Now, when your movie gets to the end, it will go back to frame 50, playing until the end, where it will go to frame 50, playing until the end ... :)

    fyi, It's standard practice to make one layer called 'Actions' (or similar), and placing all actionscript in this layer. It's easy to get confused if you've place code in different layers.

    I hope this helps.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds