?
Solved

Loading multiple Flash movies

Posted on 2004-04-08
6
Medium Priority
?
214 Views
Last Modified: 2010-04-03
In the age old tradition of sprinting before you can crawl . . . .

I want to load 3 movies into one. I would like to then have them run one after another, the first running while the other 2 load.

I have looked at loadmovie() and just dont have the time to work it out for myself without having someone take me through it.

To make things simple, I have movies called 1,2 and 3.swf and the file they are to be loaded into is called loader.swf and they are all in the same directory.

The reason for doing this is because I have it working using Javascript but it take the focus everytime I change movie and I dont want it to. Thus I thought I would try this.

Thanks for any help
0
Comment
Question by:Shroom42
[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
6 Comments
 

Author Comment

by:Shroom42
ID: 10788090
Missed out that the 3 movies are different each time the movie loads.  Also if a movie that is loaded jumps to a URL on clicking it, can I override that from the main movie, or can I open another url at the same time? either would do.
0
 
LVL 19

Expert Comment

by:Montoya
ID: 10789036
do you want the movies to load in sequence? first one, then two, then 3?

If so, do you want 2 to load after 1 is complete, and so on?

0
 

Author Comment

by:Shroom42
ID: 10789871
Hi Iammontoya,

I would like them to play in sequence, Ideally I would like 2 to load while 1 plays, but if all 3 are loaded first that is not too much of a problem as the files are quite small (20-75k) and I could add a preloader.  Iam am more interested in the dynamic loading aspect.
0
 
LVL 3

Accepted Solution

by:
mixart earned 1400 total points
ID: 10830089
May not be the most efficient method but you could try this...

Put 3 empty MC's on the stage with instance names of "one", "two, "Three".

Frame 1
//load each movie into an empty MC
one.loadMovie"1.swf";
two.loadMovie"2.swf";
three.loadMovie"3.swf";

frame2
// pause the 2nd and 3rd movie
two.gotoAndStop(1);
three.gotoAndStop(1);

//hide the second and 3rd MC
two._visible = false;
three._visibe = false;

//test if you're at the last frame, then play next
if(one._currentframe == one._totalframes){
two._visible = true;
two.gotoAndPlay(1);
//hide the first and reset
one._visible = false
one.gotoAndStop(1);
} else if(two._currentframe == two._totalframes){
three._visible = true;
three.gotoAndPlay(1);
//hide the second and reset
tw0._visible = false
two.gotoAndStop(1);
}
gotoAndPlay(1);

Let me know how it goes because this is all off the top of my head an untested.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
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,…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

752 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