View Full Version : another PRELOADER, question, preload each scene?

10-05-2003, 10:20 PM
I have a movie that is 1mb going on the web. I have roughly 19 scenes and I want each scene to load when it is accessed. I am not linking single .swf files together as it conflicts with some of the design. I am wondering if anyone knows of a preloader that will load each scene as it is accessed? The largest scene is roughtly 80kb. I also have a preloader animation I got from flashkit. It is 4 frames long and here is the script on each frame. How would I plug the preloader script into this animation? I am using flash MX. Thanks in advance for all the help.

//frame one
// Put this code on frame 1
if (_framesloaded > 0 && _framesloaded == _totalframes) {

// Put this code on frame 2

//frame two
// un-comment the lines 3 to 5 below, to calculate the actual file size
// remember to COMMENT frame 3 line 3 if your going to use below
// iBytesTotal = _root.getBytesTotal();
// iBytesLoaded = _root.getBytesLoaded();
// iBytes = (iBytesLoaded/iBytesTotal)*100;
setProperty("pBar", _xscale, iBytes);

//frame three
if (iBytes<100) {
// Comment line 3 below if your using the iBytesTotal and iBytesLoaded in frame 2 line 3 to 5
iBytes = iBytes+2;
} else {

//frame four
// Load your next action below

10-05-2003, 11:19 PM
A preloader can't really be selective. Once iniated a preloader will usually load the whole movie whether you like it or not. You can start your movie playing when one or a few of your scenes have loaded, but the preloading will continue in the background.
Only other way would be to have external movies, only loaded on demand.

10-05-2003, 11:30 PM
Thanks for the reply,
Unfourtantly, when I separated my scenes into there own .swf file and linked them together it got a bit messed up. After 3 hours of trouble shooting I concluded that the when a button click was executed and the next .swf file came up it would play (flicker) on all the stop actions in the movie before starting at the begging to play the movie. This severly messed up my animation. Any ideas as to why this happens, or has anyone else heard about it? I am assuming that linking .swf files is the only way to go??

10-05-2003, 11:43 PM
You don't link to external movies but load them in the main interface movie, as in these examples...



10-06-2003, 12:14 AM
The way I designed this website is different than the traditional website. There is this rectangular bar that acts as a mask, it opens and closes revealing information/button/photos etc. So when you click lets say contact, the bar closes to a thin line then opens again to reveal the contact info. The flickering problem exists when I place a loadmovie action at the end of a played movie. When you go from a button press to the next movie it works fine. However I put a stop in the middle of the MC, (when the rectangle is open) but I need the remainder of my MC to play before moving to the next scene (the rectangle has to close back to a thin line). So how can i set up an action on a button to play a MC/or remainder of a MC before going to the next scene, when that button has been pressed? This may cure my problem. hope this isn't to confusing. Here is a dl of 2 .swf files(only the contact button will work as I want the file size to be small) It may help you guys/gals to better understand my problem. thanks again oldnewbie, you have consistently replied to all my problems which GIVES ME HOPE! as I feel like pulling my hair out at times. hehe

10-06-2003, 12:27 AM
My second link sould hold what you need to make it work. You're using a line, they're using closing doors, but it's really the same basic principle.

10-06-2003, 12:32 AM
Can't post the file, won't let me post a .swf or a .sit (on a mac, no .zip), i guess I also need to figure how when linking .swf files through a loadmovie, is there a way to start the linked .swf at a certain frame?

10-06-2003, 12:49 AM
That second link certainly seems like it will be able to help. It is late so I will be reading through this all tomorrow, if I run into another snag I will post a response here agian. Oldnewbie if you could check this thread tomorrow for any updates I would appreciate it. Thanks again for your help

10-17-2003, 02:24 AM
Cool, thanks oldnewbie, just found what I was looking for from reading this thread - what an unreal site this is. I am so new at this Flash stuff and I needed to know how to loadMovie - really simple stuff hey?, but I found exactly what I wanted from
Thank you, thank you !! :D