Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

movie clips 1

Status
Not open for further replies.

novice2004

Programmer
Feb 2, 2004
62
US
Help please,
new to Flash

I created 2 movieclips and placed
first movie clip on timeline - frame1,
second movie clip on timeline - frame2.

The only clip playing is X.swf.
How do I get to play XX.swf after X.swf is finished.

onClipEvent(load){
loadMovie ("X.swf", "_root");
}


onClipEvent(load){
loadMovie ("XX.swf", "_root");
}

Thank you
 
Do you have a "stop();" command on the first frame? If so, you need to put an action on the last frame of the first movie that tells the _parent time line to go to and play frame two:

_parent.gotoAndPlay(2);

Or maybe in this case, you may want to use:

_parent.gotoAndStop(2);

So that your timeline does not loop back to frame one again.

Hope that helps!

 
Frame 1 of main timeline:
Code:
loadMovieNum("x.swf",0);
Frame 2 of main timeline:
Code:
loadMovieNum("xx.swf",0);

Just like that no onClipEvent.

Note when you do this first movie will unload when the second movie is loaded because they are going to the same level.

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
Thank you for your help but it still does not work.
Has anybody tried if it works?
It either plays movie 1 or 2.
 
Frame 1 of main timeline:
loadMovieNum ("1.swf",0);
stop();

Frame 2 of main timeline:
loadMovieNum("2.swf",0);

Result: it plays just "1.swf"

__________________________________
Frame 1 of main timeline:
loadMovieNum ("1.swf",0);

Frame 2 of main timeline:
loadMovieNum("2.swf",0);

Result: it plays just "2.swf
 

There are several ways of doing this, but if you're using the following (loading on level 1 rather than 0), then add a stop(); action on the second frame, and in the first movie's ending frame, add...
_level0.nextFrame();


Frame 1 of main timeline:
loadMovieNum ("1.swf",1);
stop();

Frame 2 of main timeline:
loadMovieNum("2.swf",1);
stop();
 
when
"1.swf" is simple movie with the only line of actionscript
_level0.nextFrame();
then it works.

Then I tried to use a movie with more actionscript code in it and result is that
loadMovieNum ("1.swf",1);
cannot load the movie "1.swf"

when I changed loadMovieNum parameter level 1 to level 0
loadMovieNum ("1.swf",0);
the only first movie played.

I am confused with it.
 
Thanks a lot.
I used _root.nextFrame(); My bad.
Now it works.

Is it possible to have some pause between playing
"1.swf" and "2.swf"?
If yes, how would I do it so that the screen would be empty for 5 seconds after "1.swf" is finished and then would start playing "2.swf"?

How would I do it so that the last frame of the movie "1.swf" would be on screen lets say 10 seconds.
 
On the first frame of your 1.swf (BTW, it's a bad pratice to use numbered named only files... That will get you in trouble!), define the following function...
Code:
function delay(){
    _level0.nextFrame();
    clearInterval(pause);
};
Then on the last frame, correct your script to this...
Code:
stop();
pause = setInterval(delay, 10000);
// 10000 being for ten seconds, 60000 one minute

 
Sorry to bother you again.
I have last question.

How would you repeat
"1.swf" three times
then go to
"2.swf" and repeat it two times
 
Again modify the code on the last frame of 1.swf...
Code:
_root.count++;
if(_root.count < 3){
_root.gotoAndPlay(1);
} else {
stop();
pause = setInterval(delay, 10000);
// 10000 being for ten seconds, 60000 one minute
}

Add the following on the last frame of 2.swf...

_root.count++;
if(_root.count < 2){
_root.gotoAndPlay(1);
} else {
stop();
}

Think I now deserve that vote for my posts being helpful!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top