Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

the energizer bunny question: loading one movie in behind another

Status
Not open for further replies.

PantherRun

Technical User
May 18, 2004
100
0
0
US
Hey;
I know that load movie questions are ask to the point of making you all sick, but I need help. I want you to know though, that i went through 6 pages of old forum threads trying to find the answer, before i started bugging you again.

So here it is. As you may know I've chopped my movies into small movies ranging in size from 2 to 7 mb, and as oldnewb pointed out anything over 2.7mb creates a wait on broadband.

To lessen that wait, i need to load, as example say movie2, in behind movie1 as it is being watched (or at least have preloaded as much of movie2 as possible.)
Further,on movie 1 is a button that when pressed will need to trigger the playing of movie2

So how do i do this? And please the simpler solution for my sucky flash abilty the better.

Here's what I've done thus far.

- each movie is armed with a preloader.
- on movie1, on the 1st frame of the internal timeline of the MC, I have this script: loadMovieNum("movie2.swf", 2);

Idea being of course, as they watch movie 1, we've already triggered the preloading of movie2.

Note: movie1 was previously loaded to level 3, say.

Obviously my first problem is stopping movie2 from playing/barging in on movie1 until it has finished playing. AND WE WILL KNOW THAT when the viewer hits the forward button on movie1 to go to movie2.

How do i do that. (In one of your threads Old, you mentioned an off-stage container clip)

Now to the button. What do i put on the button so that when it is pressed it dumps out movie1, level 3 and starts to play movie2, level2. (the button used to house the loadmovienum command but it nolonger needs to load anything, just simply wash away the old movie and trigger the playing of the new movie.

Any help on those 2 issues would be appreciated.

Hoss








 
Make sure you have a stop action and a first blank frame on the second and other movies, so that it loads but doesn't show up or start playing until it's told to.

Next, continue to load this second movie as you're doing it on the first playing frame of your first movie.

On your button, you could try this...

on(release){
unloadMovieNum(3);
loadmovieNum("movie2.swf", 2);
}
If the movie has had time to fully preload, it should then start playing, if not, then the preloader should kick in and preload the rest of the file and then start it playing.

You can also add the following at the end of your first movie, so that if the button hasn't been pressed, the second movie would start playing...

stop();
unloadMovieNum(3);
loadmovieNum("movie2.swf", 2);

Repeat the process for all your movies.


Regards. Affiliate Program - Web Hosting - Web Design
 
Thanks Old; i will try all this in the morning.

As an aside: is there some sript i could add to movie1 that would 'cascade' the loading of ALL the following movies? Movie1 triggers the loading in of movie2 and when movie2's done loading, movie3 is automatically triggered to load and on and on. That way script wouldn't need to be added to each movie, just to the 1st frame on the first movie - is such a thing possible; the simplicity of it seems better.

Hoss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top