PDA

View Full Version : levels in loaded swf file



kev458
October 10th, 2003, 05:20 AM
This is a major headache.
The main swf file of my site loads other swf files into it. Nothing hard there!
But one of these loaded swf's has a number of buttons and what I need it to do is load aditional swf's into 'levels' of that file (not the main swf).
I just can't seem to do it. Everything works fine but the swf's load into the main swf meaning they overlap areas that I don't want them to appear in.
Does anyone have any idea if;
1) You can load into levels within a loaded swf.
2) Does each swf have its own levels or do we have to use only one set of levels that are in the main swf.
3) And if they do have their own levels, how on earth do I tell it to load into them.

My AS is as simple as this;

loadMovieNum("quail01.swf", portvar);

portvar is a variable.

As I say it works fine when testing it within this swf, but as soon as I use the 'main swf', it loads into that files levels.

Thanks.

gheckman
October 10th, 2003, 11:59 AM
Personally i have never tried to load movies into movies that have been loaded. - i would try to place everything on the main.swf's levels. Place you loaded movie on a higher level and then load it's content on a lower level. Or visa versa. Basically just figure out what levels work best for you within the Main timeline

Maizoon
October 10th, 2003, 02:09 PM
I'm not sure that I understand what your trying to do but here goes:

Main movie (container) with a movie (sub) loaded into container...then movies (other) loaded into the sub?

so the heirarchy would be (container) -> (sub) -> (other) if I'm following you right?

In the Main (container) movie your script would be like:
createEmptyMovieClip("container",1);
loadMovie("movie.swf","container");
that script would make a movie clip to hold your loaded .swf files

then in the loaded (sub) .swf files you'd put this to load your loaded (other) .swf's :-P
loadMovie("loaded.swf","1);

Which will load movies on top of the existing movie (which is inside another movie) if you wanted the loaded movies to replace the existing movie use 0 instead of 1. Keep in mind that anything you load from within the 2nd movie will load on top of the main movie file unless you change the very first 1 to a 0. I hope this makes sense, if it doesn't take a look at these links.

http://www.kirupa.com/developer/actionscript/tricks/relativeaddressing.htm

http://www.actionscript.org/tutorials/beginner/paths/index.shtml