Solved

Loading multiple Flash movies

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
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…
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 what frame rate is, how to control it and what effect it has on the video.

724 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