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

movie won't go away 1

Status
Not open for further replies.

Goat23

Technical User
Jul 22, 2001
61
US
How do you make a movie disappear once you clcik off of it. Say you have a main movie and sub movies, but they play in the same spot, and you can't get rid of the first movie. What I want to do is have a movies section and as soon as you click on another movie link the first one totally disappears. I hope someone can help me!
 
When you load the "sub" movies load them all into the same level... ie: loadMovieNum ("subMovie.swf", 1);

If you use the same level for "subMovie2.swf" (level = 1 in sample above), then the previous level 1 movie will automatically unload.

Hope that helps!
 
Would these links to new movies be elsewhere on the page (html) or within the movies themselves!
In any case, I can imagine several possible solutions!
mywink.gif
ldnewbie
 
The movies are within a movie themselves. There's a main movie with links on the side (kinda like a page with tables in a html since). The links on the side open the movie to the other side, however once I open one movie it stays there, and then the next movie either will be ontop or the bottom of the last. Then when you go back to look at the first movie it won't come up over the current displayed movie. hope that helps clear it up.
 
Hey Goat, by "submovies" are you refering to .swfs brought in by loadMovie or to movieclips placed on the timeline from the library?

If it's the latter you can access the _visible property to make the clip disappear...

_root.mymovie._visible=false;

... for example.
 
Seems to me Pixl8r's suggestion is the way to go!
Just make a larger main movie allowing some space on the right, so that when loading your different movies, in that space, they don't cover up your left buttons. Then just allways load your movies on level 1. Loading on the same level will automatically unload the previous movie!
mywink.gif
ldnewbie
 
Where do I use the load movie command, in the actual movie, or on the main page?
 
The way I see it and understand what you're saying... I wouldn't put any other movie (on the right side) in your main movie with the buttons. If you do put one, I'd use a mc, that way when you load the other movies, you can make this lowest movie invisible. It could allways be remade visible on a press of a main movie button for example.

As for where you would put the loadMovie action, guess it would be on each button. If you want to preload all of these movies before your main movie plays... Well that's another story! You have to use a preloader that loads all of them in advance.
mywink.gif
ldnewbie
 
Yes I would think that you would want to put the loadMovie action on each button. But like Oldnewbie said, if you want to preload the movies that is a whole different issue.

Good luck!
 
Can I e-mail one of you what I got and you can see first hand the mess I got?
 
No problem! E-mail away! oldnewbie@hotmail.com

Bangers?
mywink.gif
ldnewbie
 
Hey Goat,
Here's the link:


No preloader anywhere on this (not even in the loaded movies), so give it some time to preload the movies on the first pass, when you click any of the buttons.
Just loading each movie on level 1. When you load another movie it automatically unloads the previous one, since it replaces it on level 1.
The back button on each movie simply unloads the current movie on level 1.

To check the scripting, you can download the complete package:


Regards,

mywink.gif
ldnewbie
 
Thanks oldnewbie,

That helped out alot!
I'll tell you what I've changed around and some more new questions. The buttons I had were all on different layers instead of the same layer like in your movie. I think that was the major probem. I had kinda run through it before, but I didn't want to make any drastic changes. Alright, on to the new question. Now when you go to load movie ("join.swf", 1) is that suppose to be a new scene or just a new movie? Where am I suppose to put this movie? The error that comes up is this:
Error opening URL "file:///C|/WINDOWS/Desktop/join.swf"
Thanks in advance!
 
I just wanted to add another plus, I've gotten my movie down to 2.14m, so that's definitly a plus!
 
A join movie? I didn't have a join movie, so if you're talking about one of your movies, yes it should be a new movie (called by a button as all the others), and that error you get is probably because that movie is not in the same directory as all your other movies.

As for the buttons on different layers... Don't think that would of made a difference. Must be something else you wasn't doing right!

That reduced file size is encouraging!

Regards,
mywink.gif
ldnewbie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top