Solved

Controlling flashmovies in html frames.

Posted on 2004-09-22
7
200 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

685 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