PDA

View Full Version : Preloader technique from www.2advanced.com


zanex
02-07-2001, 06:23 PM
I think METROV wrote some stuff about the preloader technique used in http://www.2advanced.com. I'm working on a similar site concept with the opening of the doors. I can't seem to figure it out, even after going to your tutorials.

Just can't seem to find the right scripting which will allow me to keep the doors closed and preload the new swf file underneath, then open the doors. I understand everything else but can't put the script together properly.

Jesse
02-08-2001, 12:58 AM
Can't you just have your door clip with the following structure:

Frame 1:
Blank.
Stop().

Frame 2 - 10:
Your closing animation.
With a stop() in Frame 10.

Frame 11 - 20:
Your opning animation.
With a gotoAndStop(1); in frame 20.

This door clip would be loaded into _level2.
Then your buttons load their movies in _level1 and tell _level2.door.gotoAndPlay(2);
And your clips each have a preloader of their own, (it doesn't have to have any visual elements, just script so we can determine whien it's fully loaded), and when preloaded they have: _level2.door.gotoAndPlay(11);

That sounds good to me. You couls also use empty MCs in place of loading into levels. But that would make unloading more complicated, ashere you can just unload _level1 to load up more content.

Cheers

Jesse

Immulsifier
02-08-2001, 02:38 PM
Nearly Jesse :) Thats how I did mine originally but it has a few bugs when you have lots off different movies to load. This is the best way:-

Do what Jesse says to construct your doors and add the closing and opening frames etc. This is the secret tho :) You have to add a separate door animation for each movie you want to load. For example. If you have a separate file called contact.swf say you would have a contact frame in you door animation which would be targeted when you press on the contact button. At the last frame in the door animation you would have the load movie command to load the contact.swf file. If you have the load movie command execute when you press the button the movie starts to load before the doors have closed which is the snag :)

Other than that what Jesse says is right. When you have loaded the movie you just target the doors again and tell them to open :) Its a little complicated to explain on here. If you drop me an email at immulsifier@btinternet.com I will send you my fla file for my doors so you can see how its constructed. BTW if you want to see mine in action visit http://www.immulsifier.sprite-network.com :) Click on the websites button and you will see it in action :)

Immy

Jesse
02-09-2001, 03:06 AM
You win the record for highest number of smileys in one short post my friend :)

Just an additional note: You could still go about it my way. I didn't think of the loadMovie problem but it could be overcome like this:

the last frame of your door closing animation has:
loadMovieNum (_level0:movieToLoad, 1);
Then your buttons each set the movieToLoad variable to the appropriate SWF. SO the portfolio button would have:

on (press) {
_level0:movieToLoad = "portfolio.swf";
_level2.doors.gotoAndPlay(2);
}

That would mean that the doors close before the movie starts loading and would save you having to add lots of door closing animations. :)

Cheers

Jesse

Immulsifier
02-09-2001, 10:17 PM
OOOOOOOOOOOO nice one. Didnt think of doing it like that. Would cut back on some filesize as well. Thanks.

Oh and BTW I like my little :)

LOL

mustngt
02-14-2001, 04:47 PM
Everthing you guys have been saying totally makes sense...but when the external movie preloads, I take it you have some fake animation that just plays above the doors in the main movie. But what if I wanted to display the percentage downloaded and use a moving bar or something to that effect. How do you display that when the preloader is in the external movie which is being loaded below the doors?

zanex
02-14-2001, 07:59 PM
Not really sure, but it could be a mc with telltarget actions? Thats just a wild guess though. Some how its got to communicate directly to the movie being loaded. Or you could make an animation and simulate the effect of a percentage loader. Hope that gave some ideas to you.

Jesse
02-15-2001, 12:26 AM
You'd use a standard percentage preloader in the clip being loaded (which itself is below the doors) and update the variables in text fields above the doors. So these text fields wouldn't be part of the loading clip, they just show variables relating to the loading clip.


Cheers


Jesse