Help playing multiple SWFs in order on separate timeline
Ok, I have about 12 separate SWFs that are all imported and played through a separate SWF that acts as a wrapper with a menu, etc.
I want to be able to load the SWFs continuously on the main timeline when each SWF finishes it goes to another frame label on the main timeline and loads the next SWF and continues to play.
I am aware that I can use loadMovieNum("file1.swf", 1); but that just overlapps what just played and has no communication with the "main" SWF to trigger other actions.
Hi,
If u have loaded a movie at level 1 u can make it communicate with the the main movie in which it has been lkoaded by using level numbers.
For example if u have a movie loaded at level1 and u want it to do something to the main movie say to make at stop at some frame label u can do it as follows
By default movie loaded at level1 will appear above and over the movie at level0 as levels follow a stacking order.
A simple technique to avoid this prpoblem may be to place a reference image of ur wrapper in a guide layer and then deisgn the rest of the swf's accordingly so that they dont overlap each other
you want to load an external.swf into your MAIN.swf?...right?..when this external1.swf gets done playing..you want it load the next external2.swf Is this correct?
yea! so the main.SWF acts as a wrapper with a menu overlay, etc... I am loading about 10 other SWFs into it. So I have it continuously playing with (loadMovieNum) but it's playing on top of the "wrapper" and I have no control to tell main.swf that a new movie has been loaded.
well, first I would use loadMovie instead of loadMovieNum.
loadMovieNum uses _levels to load your content/.swf's which is like a stack of papers..
1 sheet on top of another..
"loadMovie" on the other hand..loads yoru content into a target (empty movieClip)..and hence "acts as a wrapper" itself.
so in yoru MAIN (index) .swf you have your logo/buttons/etc..etc..
and on a NEW layer...you have an empty/blank MC that you have dragged form yoru library...make sure you give it an INSTANCE NAME. for this example we'll use containerClip.
So now on your buttons, you put the code of:
code:
on (press) {
_root.containerClip.loadMovie("external1.swf");
}
this now loads that external.swf into the target clip containerClip...
if you have another button with the code of:
code:
on (press) {
_root.containerClip.loadMovie("external2.swf");
}
it will remove the content already in containerClip (which was external1.swf)..and place external2.swf there.. (no need to unload anything)..
now...if you wanted to target a movieClip or variable in one of your external.swf's you just loaded... you will now need to use "containerClip" in yoru path to it. So if there was a movieClip in external1.swf that I wanted to change the _alpha of. I would do it like so:
code:
_root.containerClip.someClip._alpha = 25;
}
a common problem you will run into is, when you created your external.swf, if you used _root in any of yoru code to make things work..once you load them into the MAIN(wrapper).swf they will no longer work..as _root refers to the MAIN (wrapper) timeline.
So say if I had one SWF that was the menu, etc and I wanted to load 10 separate SWFs that continuously play under the wrapper. Would I use instanceofMConmainswf.loadMovie("file1.swf"); ?
no... if you had a MAIN.swf with your menu and stuff in it...you would need to create the containerClip as talked about above...and load into that.
if you want to load UNDER the wrapper..which is your _root (main) movie..then you'll need to load your MAIN movie into a _level itself..and since you cant get any lower than 0 ....you have to load it into a _level higher than that.
So you will need another .swf that just has the load action to load your (once) main movie into a _level higher than 0 so you can load yoru external.swf content under it.. (not recommended)
After External1.swf is loaded I wanted to continuously play External2.swf > External3.swf and still have it remain under the wrapper. How would that happen?