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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a loaded movie to load another movie 1

Status
Not open for further replies.

Concussion

Technical User
Jun 17, 2002
21
0
0
US
I made this

and it loads into this


as a movie clip. What I am trying to do is make the Mike button in the Band Puller2.swf movie that I load in to the main page load this


into the view windows. Can this be done? I am having trouble getting it to work if it is.

If you want to look at the .fla's they are in the same diretories. Just change the .swf ext into .fla.

Meanwhile I will keep looking for a tutorial that might give me more information on the process
 
Loading into movieClips is a relatively straightforward proposition (thankfully!). You use the command:

loadMovieNum("mySWF.swf", _root.myMovieClip);

... this will load your SWF file into a movieClip called "myMovieClip" in the main timeline of your main movie. When you load a SWF into a movieClip instead of a level, it completely replaces the timeline of that movieClip, effectively deleting what was there before.

So if you have these 3 SWF files:

Main Movie - main interface
Menu Movie - with the 3 buttons
Content Movies - one for each of the 3 menu options

you will need these movieClips in your main movie:

menuClip - to hold the menu SWF
contentClip - to hold the 3 content files

If these are both in your main timeline, their absolute addresses should be:

_root.menuClip
_root.contentClip

So, to load the Menu Movie into the menuClip, the button in your Main Movie needs to have this action:
Code:
on (release){
    loadMovieNum("menu.swf", _root.menuClip);
}
Then for the Menu Movie to load the Content Movies into the contentClip in the Main Movie, the buttons in the Menu Movie need to have these actions:
Code:
on (release){
    loadMovieNum("content01.swf", _root.contentClip);
}

on (release){
    loadMovieNum("content02.swf", _root.contentClip);
}

on (release){
    loadMovieNum("content03.swf", _root.contentClip);
}
 
A slight correction, if I'm permitted!

The LoadMovie action syntax loadMovieNum is actually for loading a movie on a level. Unless you type it in this way (expert mode), it should automatically swicht to loadMovie alone when loading the movie in a holder movie clip. Thus the syntax should really be...

on (release){
loadMovie("content03.swf", _root.contentClip);
}

It could also be written like so:

on (release){
_root.contentClip.loadMovie("content03.swf");
}
Regards,

new.gif
 
Thankyou very much for such clear responses. Ill have to wait till later to set it all up but that really helps me understand the load movie command. You two cleared up about 9 hours of brain racking.

Thanks again!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top