Solved

Loading multiple Flash movies

Posted on 2004-04-08
6
192 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

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 record live broadcast.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

770 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