Solved

Loading multiple Flash movies

Posted on 2004-04-08
6
184 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
  • 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 350 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
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 how to record live broadcast.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

867 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

17 Experts available now in Live!

Get 1:1 Help Now