Solved

How do I communicate between the main movie and an externally loaded swf movie in flash ?

Posted on 2004-09-25
4
267 Views
Last Modified: 2012-05-05
Hi,

I can load external swf into my main movie. I want to know how to communicate between an externally loaded swf and the main movie. Say I wanted to get the current frame number of the externally loaded swf as I played how would I do that? Also say I had a button in the external swf that I wanted to use to play a frame number or label in the main movie how would I do that ? And finally how do I control the externally loaded swf like gotoandplay a frame number or label in the external swf?

I use:

this.createEmptyMovieClip("movie1_mc", 1);
movie1_mc.loadMovie("external1.swf");

As I find loading external swf's into a movie clip easier to control so you may want to take that into account when answering

Any help would be appreciated

Cheers
Rabid Lemming
0
Comment
Question by:Rawdon Hume
  • 2
4 Comments
 
LVL 13

Assisted Solution

by:FLAASHER
FLAASHER earned 170 total points
ID: 12153542
look man
i will learn u how to make this with loadMovieNum not with loadMovie

at the frist frame in the main moviw we will put this code

loadMovieNum("external1.swf",9);
this will load "external1.swf", in level "9"

and i make 2 buuton
the frist will make external1.swf to go to frame 15 and the second will make it go to frame 30
u see i control the external1.swf from the main movie
ok :)???

and this is an example
see it and tell me if u eant any other thing :)

http://www.midoco.com/rabidlemming.zip

wiating 4 u
0
 
LVL 8

Accepted Solution

by:
Cerf earned 170 total points
ID: 12156572
Hello Friend,

If you're using loadMovie, which is the recomended for flexibility, when you load an external swf into an empty movie clip, it becomes part of the main movie. So, you can comunicate  with it as easy as using the name of the movie clip you used to load it.
For example,
Lets say that you have an external movie that has a dynamic text field called "ext_text" and the mc you're loading the movie in is named "externally_loaded" (empty mc). If you want to set the text of the externally loaded movie just type this AS:
_root.externally_loaded.ext_text.text="Experts-Exchange rules :-)"

I have put together a small example. Look for "loadmovie_com.zip" at http://es.geocities.com/cerfx/flash

Hope this helps,

Cërf.
0
 
LVL 2

Author Comment

by:Rawdon Hume
ID: 12161668
hi,

Thank you to the both of you that has been very helpful at least now I have a clearer idea about communicating between flash movies loaded into each other

Thank you both

Cheers
Rabid Lemming
0
 
LVL 2

Author Comment

by:Rawdon Hume
ID: 12161756
Hi,

Yer that’s fantastic, just what I wanted. At least now I have a better understanding of how to communicate between flash movies that are loaded into a main movie

Cheers
Rabid Lemming
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
FLV versus SWF 11 277
private function works only without TabNavigator? 3 310
Script to Delete registry entry based on Product name 6 162
How to block online streaming via TMG2010 ? 2 132
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
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 goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

773 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