Controlling flashmovies in html frames.

I want to have a menu bar created with flash in the top frame of my html page.  I want the buttons (ie home, links, contact us) to change the movie that is played in a specific frame of my html page.  basically once the home page is loaded.  I want to be able to click on contact us and the page doesn't reload just the movie in a specific cell loads and plays.  how do I do this?
Who is Participating?
mrdilliardConnect With a Mentor Commented:

In your main movie that's receiving the commands, put this code on your first frame.
lcReceiver = new LocalConnection ();
lcReceiver.ChangeScenes= function (scene) {
         _root.gotoAndPlay(scene,1); //moves you to frame 1 of the scene you pass in.
lcReceiver.connect("lcConn"); //call lcConn whatever you want, just make sure it's the same in the sending movie.

In your sending movie, put this code on the frames where your buttons show up

mcButton.onRelease = function(){
         lcSender= new LocalConnection();
         lcSender.send ("lcConn", "ChangeScenes", "Scene 2");

Is that what you needed? By the way, you can use a LocalConnection between frames, between browsers, between swfs and between projectors, and between any combination of two, as far as I know.
Congratulations, you get to use the LocalConnection object.

I would go through and explain it, but Macromedia's done a pretty good job already.
liv4funAuthor Commented:
Can you give me an idea of what the scripting would look like for telling a movie to go to and play a specific scene in the movie that is already loaded in a different frame on my web page?
if i understand you correctly, you want to have a flash navigation in one frame control the flash movie in another frame?

if thats the case, you can also simply use javascript, parse a frame number through to it.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.