Solved

Controlling flashmovies in html frames.

Posted on 2004-09-22
7
161 Views
Last Modified: 2010-04-03
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?
0
Comment
Question by:liv4fun
  • 2
7 Comments
 
LVL 4

Expert Comment

by:mrdilliard
ID: 12128243
Congratulations, you get to use the LocalConnection object.

I would go through and explain it, but Macromedia's done a pretty good job already.

http://www.macromedia.com/support/flash/ts/documents/localconnection.htm
0
 

Author Comment

by:liv4fun
ID: 12129076
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?
0
 
LVL 4

Accepted Solution

by:
mrdilliard earned 250 total points
ID: 12130249
sure...

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.
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 12130857
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.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now