Solved

Loading multiple Flash movies

Posted on 2004-04-08
6
174 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:Iammontoya
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
YouTube Link 10 346
flash cs6 4 334
Video sharing with user login 3 185
deploy Adobe and Java updates to 100 workstations using LogMeIn Pro? 5 132
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…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
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.

707 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