PDA

View Full Version : Brand new and very novice user question


aguadulce
12-23-2002, 06:57 PM
I have a very basic question, and I've searched the Flash doc with no clear answer.

I have created five small movies and turned each into a movie clip stored in my library. Each one of these movie clips is four seconds in duration. I want to play each one, one after the other in my main movie. My very basic question is, how do I do this? I've read about attachMovie, play, etc., but there is nothing in the doc that ties it all together. Where do I start, and what do I do? Each of the small movies plays fine and does exactly what I want it to do. I just want to play them in sequence from a controlling main movie in the simplest way possible ... no buttons for the user to press or anything. The main movie will be the opening page of my website, so when someone goes there, this movie will start running.

If there is a place in the Flash location where the way to do this is described, please point me to that. Otherwise, help!

Olden
12-23-2002, 08:54 PM
First, give each mc an instance name.

On the last frame of each mc, stop the current clip, and also start the next clip.

For example, if my clips are named "mc1", mc2, mc3, etc., the code would be like this on the last frame of each clip:

//On the last frame of mc1 put:
_root.mc2.play(); // starts the next clip
stop(); // stops the current clip

//On the last frame of mc2 put:
_root.mc3.play();
stop();


This will stop the current movie when it gets to the end and start the next one.

On the main timeline, be sure to stop all but the first mc from playing on the first frame.

aguadulce
12-23-2002, 10:15 PM
Thanks for the advice, but I'm still stuck at something more basic.
I still can't see my movie clip being played. Here's my setup: I have an actions layer, and a movies layer. On the stage in the movies layer, I've put an instance of each of the five movie clips. What actionscript do I write, and where, just to get the first one of the movie clips to play? Does the code go in the actions layer as:

_root.mc1.play();

I tried this, and the movie appears to play (I see the frames counter increase in the test movie environment), but I don't see anything. I'd be happy just to see the one movie clip play, visible so that I can see it.

Still needing help .... thanks for any advice in advance.

Olden
12-23-2002, 11:39 PM
Only the items in the current timeline will play when in the development environment. So, if you are viewing the timeline of a specific movie clip and hit the play button from the controller, you'll only see what's on that timeline.

If you are on the main timeline and hit play, you won't see the individual movie clips play. Instead, test your movie by using CTRL+ENTER or from the "Control Menu", select "Test Movie". Then you'll see everything running as expected.

aguadulce
12-24-2002, 01:08 AM
I think that there must be something fundamentally wrong with the way that I've done things. Even if I select "Test Movie" from the Control dropdown, or I type CTRL+ENTER, I don't see anything. There's only a small circle with a cross in it on the stage to represent, I guess, the instance of the movie clip. I'm still lost.

Thanks for your help.

Olden
12-24-2002, 05:16 PM
Take a look at how the attached file is constructed:

There are three movie clips with instance names:
Square = mc1
Circle = mc2
Triangle = mc3

If you double click on any one of these, you'll open the timeline for that clip. On the last frame of each clip, you'll see how the end of the clip starts the action for the next clip and stops its own action.

On the main timeline, the first frame stops mc2 and mc3 from playing. So only mc1 will start when the movie opens. mc2 is started from mc1, mc3 is started from mc2. Get the idea?

In this case, mc1 starts again from mc3 to restart the cycle. (I could have omitted this and had the whole thing loop on its own but this way I have more control over it.)

aguadulce
01-01-2003, 05:49 PM
I apologize for taking so long, but I do want to let you know that I appreciate your help, and I was able to make my project work.

Thanks.