PDA

View Full Version : managing multiple swf files


good to know
08-07-2006, 01:14 AM
Hello,

I’m building a site with multiple “swf” files where all buttons are movie clips.

The task:

There is a “main.swf” file with big “myLoader” and “home” buttons.

Upon “home” button release the “home.swf” is loaded in “myLoader”.

This “home.swf” has “living room” button.

I want upon release of “living room” button “living room.swf” file will replace the “home.swf” in the “myLoader” on the main page.

How do I do that?

Thanks a lot

cannon303
08-07-2006, 09:01 PM
in a frame in main.swf:

home.onRelease = function(){
loadMovie("home.swf","myLoader")
}
in a frame in home.swf:

livingRoom.onRelease = function(){
loadMovie("livingroom.swf","_root.myLoader")
}

Make sure that your movie clips have the instance names in the property inspector to match your script and make sure you're attaching your script to a frame as opposed to the movie clip itself otherwise its a bit different.

good to know
08-08-2006, 12:53 PM
I did it.

Thank you very much