Solved

How to have a Flash animation repeat x times and then stop? but just certain layers

Posted on 2009-04-07
2
1,399 Views
Last Modified: 2012-08-13
Hi Guys

I have a flash header and i include a picture slide show, now i would like just to keep rotating the slide show, but when i insert code in the last frame as goandplay(1) is reloading the whole header again, i just want the images keep rotating

how do i do taht

best regards
0
Comment
Question by:titorober23
2 Comments
 
LVL 5

Expert Comment

by:john_hollings
Comment Utility
Hi,

In order to help i need a little more information.  where does the picture slide show start as gotoAndPlay(1) will got back to frame 1 of the movie.  Have your keyframed the picture show or is it a nested movieclip? If you can provide your fla it would make it easier to determine what is happening.
0
 
LVL 18

Accepted Solution

by:
Graphixer earned 125 total points
Comment Utility
If I understand you correctly, here's what I use.  In the second to last frame of your slide show movie clip, drop in:

var noOfLoops = 3;  // change '3' to the number of loops you want

if (loop == undefined) {
    loop = 1;
} else {
    loop++;
    if (loop == noOfLoops) {
        stop();
    }
}

In the last frame, drop in:

this.gotoAndPlay(1);

Oh, and take out the gotoAndPlay(1) from last frame of your main timeline and replace it with stop();

I hope this helps.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now