PDA

View Full Version : Initializing Movie


alsvik
02-24-2005, 03:15 PM
I've been searching this place to find an answer to my question - but with no luck... Here it goes.

I've cretaed a site using the "initializing movie tutorial" - and now i have a problem.
I want to be able to unload the "movieone" (or whatever movie is loaded) by clicking a button. How do i do that?

I need a button that clears the "movieone_level" - and if possible, reloades the main movie. (actually like and F5 from the browser :) )

Doccie
02-24-2005, 03:18 PM
on(release){
unloadMovie();
loadMovie("main.swf", "movieone_level");
}
Easy as that ;)

alsvik
02-24-2005, 05:38 PM
Thanks!
I'll try that when i'll return from work ...

This is a very nice place, with a lot of very helpful people.
One day, i might even be able to help someone myself :rolleyes:

Doccie
02-24-2005, 06:33 PM
No worries

I hope and am sure you will be :)

alsvik
02-24-2005, 06:48 PM
Still haven't testet it, but was just wondering if it is possible to load a movie to a certain level, and also decide where in the movie to start?

I think that might need some explanation: :eek:

I want to reload MAIN and undload MovieOne.
(the unload part you just made easy - thanks)
But reloading MAIN, would cause the flashsite to show the preloader once again (just for a sec. though). I wouldn't want that.
So is it possible to state in (on) the button, that i want to reload MAIN to a specific level, and play a specific scene?

With level i mean the ones stated in the "Initializing movie tutorial":
Main (0)
One (1)
Initializing (2)
Interface (3)

If interested, this is all about being able to change the background on the MAIN movie, from the Interface! :confused:

Doccie
02-24-2005, 07:22 PM
you can use either a target (emptyMC/movieone_lvl) or a level with the loadmovie command.
So instead of using loadMovie("main.swf", "movieone_level");, use loadMovie("main.swf", 1);

As far as playing goes... I'm not sure how to do that. I'm guessing it will be easier to change your preloadercode.

alsvik
02-24-2005, 09:02 PM
Thank you :)

It worked nice!

I just changed it to:


on(release){
unloadMovie(1);
loadMovie("main.swf", "_level0");
}


Now i just need to either change the preloader - or figure out how to load the movie and go straight to playing scene 1, since MAIN is already loaded (the movie unloaded is MovieOne i "_level0"

But this was my first priority. Thanks Doccie!!!

alsvik
02-25-2005, 02:42 PM
All done :)

I just changed the levels:

Main: 0
Background: 1
Pages: 2
Initializing Movie: 3
Interface: 4

Doing that i don't need to call a specific scene in Main - i just unload and reload Background (which calls a random background)!
Ant that's what i wanted.

Funny that i've been using this "initializing movie" for thelast 3 sites i did, and haven't really understood the principles of the layers until now :confused:

Don't really know how i managed to make the other sites then ...

But now i could probably explain this to others too.
So to anybody tat needs help on this, contact me from www.alsvik.dk or PM me.