PDA

View Full Version : Controlling Main SWF with button in another SWF


navigator81
03-05-2006, 05:20 AM
Hi All,
well i can imagin it can be a seriously stupid question for alot of you here...but its getting on my nerves here....

Here is the CASE:
I have a main Movie which is calling different other Swf Files in a "container" movie clip.
One of the External loaded SWF has some buttons in it but these are placed within a Movie clip!!!......
lets take an example:
"Main.swf" calls "1.swf" in the "container" movie clip.

1.swf has a button "btn_1" in a movie clip names "mc_1".
I have created another swf(details.swf).
Now what i want is that when i click on "btn_1"(it is inside the movie clip),it should replace the existing "1.swf" on container and load "details.swf" in it.

Is there any script i can write on the button that would enable this?

I am using :

on(release){
_level0.container.loadMovie("details.swf");
}

But it doesnt work.....

Please help!!!!

Best Regards

PreCoder
03-05-2006, 07:15 AM
Hi there,
Okay I believe I know what you mean, basically you aren't referencing the "Main.swf" correctly to be able to call the next movieclip? for example

//change the path to suit, just make sure you attach _root to refernce the 'Main.swf'
_root.Main.container.loadMovie("details.swf");
If that doesn't help or wasn't what you asked for, try sending the .fla and I'll have a look. :)

navigator81
03-05-2006, 06:15 PM
Thank you so much for helping me :
But the script seems now working on the buttons.

Please see both the main movie(idea3.fla) and blue.fla which is loaded in the main movie(idea3.fla's) clip named "container".
I have attached the 3rd movie as well which i want to load in idea3.fla when the button "International Package" placed in the Movie clip "info1_mc" of blue.fla.

Here is the Summary ...
when i click on package button in Blue.fla the new movie package details(bluepkgdetails.fla) should be displayed in Idea2.fla with a back button so that user can come back to blue.swf.

Please let me know if you could write a script which can enable this functionality.
Files attached:
idea3.fla
blue.fla
bluepkgdetails.fla

Best regards

oldnewbie
03-05-2006, 10:31 PM
No .flas were attached????

::plankl::
03-05-2006, 11:04 PM
Buttons are inside the movieclip. So that means that on(release) wont work. Am I right?

oldnewbie
03-06-2006, 12:13 AM
Only if he has button handlers on the movie clip itself.

::plankl::
03-06-2006, 11:05 AM
So if i create a button write action to it and place it into the movieclip it'll still work?