?
Solved

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

Posted on 2004-09-25
4
Medium Priority
?
288 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 13

Assisted Solution

by:FLAASHER
FLAASHER earned 680 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 680 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
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.
Suggested Courses

762 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