enixstudio
asked on
How to control or link external.swf movie from a button on the main movie.swf ?
Hello my name is alan in the last few days
i was trying to find how I can control and link an ( external.swf ) movie
from a menu with buttons inside my main movie call ( main.swf )
I can not find the code to make work each button and call a frame label on a movie clip ( pages mc ) inside my external.swf
Im using AS2
I have the structure of my movies like this.
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -
Please download and check my fla. or see it here :
http://enixstudio.com/flash_tutos/how_to_control_external_movie_tuto.zip
http://enixstudio.com/flash_tutos/how_to_control_external_movie_tuto/main.html
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -
i was trying to find how I can control and link an ( external.swf ) movie
from a menu with buttons inside my main movie call ( main.swf )
I can not find the code to make work each button and call a frame label on a movie clip ( pages mc ) inside my external.swf
Im using AS2
I have the structure of my movies like this.
--------------------------
Please download and check my fla. or see it here :
http://enixstudio.com/flash_tutos/how_to_control_external_movie_tuto.zip
http://enixstudio.com/flash_tutos/how_to_control_external_movie_tuto/main.html
--------------------------
ASKER
Hi bupper in response to your question is NO.
In my maine.swf movie I have a movieclip with the instance name call "container" this empty movieclip load inside my external.swf movie with the following code :
stop ();
this.createEmptyMovieClip( "container ", 1);
container.loadMovie("exter nal.swf");
Now on my external.swf movie i have a movieclip with the instance name call "pages" inside this movieclip I have 5 frames labels called up "p1","p2","p3","p4","p5"
So my question its how i do to communicate from my button 01 btn ( inside menu mc > main.swf. ) to my external.swf movie to my > movieclip with the instance name call "pages" and goandplay the frame label call "p1" ?
Check this link example here :: Follow the red arrow !
http://enixstudio.com/flash_tutos/how_to_control_external_movie_tuto/control_external_movie.html
if my menu was in the same movie lets say main.swf iknow this code works to call each frame label from my button 01 btn to > movieclip with instance name "pages" > to > my frame label call "p1" and works for each button !
on (press)
{
if (_root.link != 1)
{
_root.menu["item" + _root.link].gotoAndPlay("s 2");
_root.link = 1;
_root.pages.play();
} // end if
}
Check this link example here ::
http://enixstudio.com/flash_tutos/how_to_control_external_movie_tuto/crane_and_menu.html
In brief I need to do this but with my menu in my main movie and my pages on my external movie.
and thanks for the help but I hope you can help me a bit more ! : )
In my maine.swf movie I have a movieclip with the instance name call "container" this empty movieclip load inside my external.swf movie with the following code :
stop ();
this.createEmptyMovieClip(
container.loadMovie("exter
Now on my external.swf movie i have a movieclip with the instance name call "pages" inside this movieclip I have 5 frames labels called up "p1","p2","p3","p4","p5"
So my question its how i do to communicate from my button 01 btn ( inside menu mc > main.swf. ) to my external.swf movie to my > movieclip with the instance name call "pages" and goandplay the frame label call "p1" ?
Check this link example here :: Follow the red arrow !
http://enixstudio.com/flash_tutos/how_to_control_external_movie_tuto/control_external_movie.html
if my menu was in the same movie lets say main.swf iknow this code works to call each frame label from my button 01 btn to > movieclip with instance name "pages" > to > my frame label call "p1" and works for each button !
on (press)
{
if (_root.link != 1)
{
_root.menu["item" + _root.link].gotoAndPlay("s
_root.link = 1;
_root.pages.play();
} // end if
}
Check this link example here ::
http://enixstudio.com/flash_tutos/how_to_control_external_movie_tuto/crane_and_menu.html
In brief I need to do this but with my menu in my main movie and my pages on my external movie.
and thanks for the help but I hope you can help me a bit more ! : )
this is so odd, i'm sure I posted something on your topic this morning. oh well, maybe it was too early in the morning.
enixstudio what bupper is saying is correct.
not sure what your _root.link etc does, but the problem is here
_root.pages.play();
as bupper says
_root.container.container. play();
enixstudio what bupper is saying is correct.
not sure what your _root.link etc does, but the problem is here
_root.pages.play();
as bupper says
_root.container.container.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks bupper and blue-genie for your attention and patience works to perfection and how you said you do not need the lockroot !
As a contribution i upload the files for people in need in the future:
http://www.enixstudio.com/downloads/tutorials/flash/how_to_control_an_external_swf/main.html
As a contribution i upload the files for people in need in the future:
http://www.enixstudio.com/downloads/tutorials/flash/how_to_control_an_external_swf/main.html
So, when you want to reference the external movie, you do it like this:
_root.container.container
If you want to move to a frame, for example, assign this actionscript to a button on the menu:
on (release) {
_root.container.container.
}
Now when you click the menu button, the external clip will move to frame 2. Is this something like you wanted?