Multiple button actions

Hello all. What I’m trying to do is load two seperate swf’s in succesion at the press of a button. Right now when I press my button I have a ‘load movie’ action attached that loads the swf I designated, but after that one loads I want it to automatically go to the next swf I designate as soon as the first one finishes loading. Is that possible with some sort of action script?

Thanks, still new to this

I’m not sure exactly what you mean, so I can’t guarantee this will be what you’re after.

You might be able to load the first movie into a placeholder clip. This is an empty movie clip that sits either on or off teh stage, and can be hidden or visible. You can load your first movie into that, then when it has finished, load up another…

sounds worth trying. could you elaborate on the details on how this could be done (still very new to this)

Ok the easiest way of doing what i think you are after would be to have a preloader on the first clip like this.[AS]stop();
this.onEnterFrame = function() {
if (this.getBytesLoaded()<this.getBytesTotal()) {
Total = this.getBytesTotal()/1000;
Received = this.getBytesLoaded()/1000;
Percentage = (Received/Total)*100;
this.PercentText = int(Percentage);
this.bar._xscale=int(Percentage);
} else {
this.play();
this.onEnterFrame = null;
loadMovieNum(“yourmovie.swf”,1);
}
}[/AS]
that way the first movie loads and starts playing then the second movie loads.
alternatively put the load movie action anywhere in the first movie that way it loads the second one only once its already playing.
Kitiaras idea is good and would work!! but which solution are you after im not sure so thought id add my two penneth.

I just copied and pasted your action script (w/ “mymovie.swf”) and nothing happens. Here’s more detail (since i’m new to this it might seem wrong): I have (3) files. 1st, my main swf which is my main page. 2nd, my main to audio swf which is the transitional animation between the main page and my audio page. 3rd, my audio swf which is my audio page. The 2nd swf contains the way my main pg looks at the beginning, some animation, then it ends with the way my audio page looks (but its not the audio pg). At this point I need to know how the audio pg would load as soon as the ‘main to audio’ swf finishes it’s run (or an easier way to link this navigation). Hopefully this is a clearer explanation on how much of a rookie I still am, please be gentle.

aah i see so the second movie is just an intro type thing then.
You could try this :
try putting the load movie code on the LAST frame of your second movie. That way when it plays its last frame it loads the third movie in!!
[AS]stop();
loadMovie(“yourmovie.swf”, “yourtargetclip”);[/AS]on the last Frame!!
Or you could just put the animation sequance at the beginning of the third movie and cut out the need for the intro movie, or are the files to big to do this?

I know what “yourmovie.swf” is (my audio pg.swf), but what is “yourtargetclip”?

the target for the second clip to load into or if you using laodMovieNum the level you are loading it into.
Which method are u using??

I’m using the ‘loadmovie’ script. When I use the ‘loadmovie’ without the ‘yourtargetclip’ from your example, it works very nice except that the second movie has a different color background than the third movie,but keeps the second movie’s background instead of loading the third movies background. When using this example, it’s like the third movie is part of the second movie (3rd movie bieng a slave to the second movies parameters) instead of being seperate movies.

ok i thought i got what you were going on about but you have confused me??

I’m using the ‘loadmovie’ script. When I use the ‘loadmovie’ without the ‘yourtargetclip’ from your example it works very nice except that the second movie has a different color background than the third movie,but keeps the second movie’s background instead of loading the third movies background

If you are using loadMovie how are you doing it without specifing a target clip?? which clip are you loading them into??
and If the second movie is an intro why is it a different color from the third movie?
Its all getting very confused so lets try again , basically you just want one movie to play then when its played you want it load the third movie in right ?

YES(sorry about the confusion).

No problem it was just we seemed to be going round in circles a bit !!
right so post the code you are using to load the second movie in, so i can understand where you are loading it to.

loadMovieNum(“audio pg.swf”, 0);
I’m starting to get a little confused as well.
quote:If you are using loadMovie how are you doing it without specifing a target clip?? which clip are you loading them into??
We’re probably not on the same page because like I said previously I am ssooooooo new to this. I’m even having some serious touble with the tutorials on this website (I’ve succeded in 1 out of 8). Thank you for your patients.

Ok you are using the loadMovieNum method which uses levels.

loadMovieNum(“audio pg.swf”, 0);

In case you dont realise but the number after the file name is the level you are loading that clip into.
Levels are like the regular layers on the timeline except you cant see them. However it is important to note that levels can only be occupied by one movie at a time.
try this tutorial on loadMovieNum on www.tableau.com
http://www.tableau.com.au/tutorials/load_movie_tute/
or this:
http://www.tableau.com.au/tutorials/smooth_transitions/
If you still dont get it give me a shout and ill give you the name of a good book or two to learn from ok, I am myself am self taught
(as are many Flash programmers) dont get disheartened keep trying and you’ll get there in the end.

Thank you so much for your time. I’ll check out that site so I can learn how to walk before I run. Thanks again.

Probably a good plan :slight_smile:
Hope all goes well good luck man glad i was of some use.