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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you load a 2nd movie after 1st has loaded.

Status
Not open for further replies.

Lizzie

Technical User
Aug 1, 2000
62
GB
The movie I am making has two different navigation pages: 1st is from the into page and the second is from the main navigation page.
I am trying to load the main navigation (level 0) page then a content page ontop (level 1). But they both load at the same time. I know it must be something to do with if frame is loaded but am not experienced enough in code to do it.

When you get onto the main navigation menu page the pages are all targets so it works fine but it is just getting from the intro menu to the main nav page.
Please help!!
 
I think you have a problem with your target. If you make a host movieclip (an empty one) and you drag an instance of it into the scene, at the point you want the second movie to be loaded, name the instance and refer to it in the load movie action (instead of the level).
 
This doesn't appear to work! I have made an empty movie clip, put it on the stage and named it. I have done the loadmovie to start at the target but it just loads as the next scene does. Any suggestions? Is it something to do with the scene?
 
How do you want it to work exactly? This sounds like a problem I had once and it involved loadin movies (external sources) into a target. It shouldn't be too hard to have something load into a target when you want (just set a frame action to load a movie into a target) and use the main navigation page to decide this. However, I might be way off base. Give me more information, and I might be able to help you.

Jonathan
 
Thanks. That is sort of what I have done and it does work but with a little alteration. I have had to put about 15 blank frames before the second movie so it plays at the correct time. I am a bit worried that it won't work in practice though on the web. I think I will have to do an 'if frame has loaded' bit to keep the movies in sinc. I think the problem is that the movie is going from one scene to another and I can't set the target in the next scene, it doesn't appear to load it when it gets there.
Any suggestions?
 
Lizzie-- You also need a background on each movie you want to load. Otherwise, the bottom movies will show through. Just create a large rectangle, fill it in, and put it on the bottom layer of your movie.

Use buttons to go from one movie to the next and in the action of the button, choose load movie or unload movie.

 
OK, all you have to do is in the very first frame of the movie set a target off of the stage to begin loading the movie, that way it loads into the cache and can be called (almost) instantly into another target when you want it to. Just use a preloader to buy time (assume the end user is using 28K) and make sure the rest of the site is loaded (or the page or what ever, then use a frame action to reload the movie into a new target where you want it to be (you'll probably have to preview in a browser to make sure the target is lining up right). I hope this helps. This is the technique I used on my site at It's not perfect, and actually I'm redoing it by importing all of it into director so it's all one file and one download time, because as you'll see, there are some technical difficulties (at least on a slow modem, the one you have to design for, alas). Anyhow, I hope this helps, so please let me know (I'm receiving responses for this). Anyone else got better suggestions?
 
Blended,
Thanks, that does sound like the answer. The movie starts with an intro, then you click which ever content page you want. I wanted the movie to then play another animation, then load the content page on top of the finished animated main movie.
(I hope this makes sense! It's hard to explain in words!)
I have made separate movies for all the content pages. Shall I set targets for them all at the beginning of the intro, then call them to play when the user clicks a content button?
 
I have tried to do as you said but it doesn't work. I must be doing something wrong.

I have put the actions: loadMovie ("main_page.swf", "/whatever");

Then 3 scenes later, put in a target called "whatever" and it doesn't load it up. Am I missing some scripting in the whatever target?

Sorry to keep pestering!
 
I think you need to have the animated movie call up the new movie into the same target. I think you can do this by having it load into the same level or target. It also sounds that what you're trying to do could be a snap in Director (if that's an option). I know this can be done. If you have the url of the site maybe I can see it and know what the problem is? This sounds interesting to me, so it's no problem.

Jonathan
 
I did get it to work (on my computer with shockwave 5). BUT, I am having so many problems with all the scripting now! I think because I have made it in Flash 5 (first time), it will not work on a computer with shockwave 4. It is doing all sorts of strange things to the variables!! AHHHH!
It's on a temporary site at the moment. By all means have a look and see if you can help. Thanks.

 
Ok.

I went to your site, and what you aren't doing is unload the movie from the target, or else you aren't loading the movie into the same layer as the previos target (that's why they're overlapping). Go back and make them unload on button actions (I know I know, it's a scripting jungle) and everything should work fine. I can tell it will work great. One thing, though, is that you should set it up to where it displays larger text. It's not just an aesthetic problem, it's also a matter of users with poor eyesight and end user ability and comfort. Just a consideration. Try the unload thing. It should work fine. Technically, these things work in flash 4, but if your're using flash 5 you should use the flash 5 plug-in, and I don't think it's an option, but you can try rewriting the html part of it and see if it works.

Jonathan
 
Hi,
Thanks Jonathan for all your help. I think I am going to take the easy way out though and force the viewer to get the flash 5 plugin. It doesn't like being published as flash 4, not sure why. There isn't anything major in the action apart from tell target and load, unload movie.
The targets for the services and portfolio work fine when it is published as flash 5. They have variables in place so that the close when one is open and so forth so I don't know what is happening when published as flash 4.
Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top