Click to See Complete Forum and Search --> : preloading a seperate swf file.
joshfinkelstein
07-01-2003, 06:21 PM
I have a client who doen't want to see a preloading percentage. he wants some kind of intro for the preloader. so i made the intro, but it isn't acting like a preloader. i really don't know how to design my own action scripts so i usually copy them or use tutorials, but in this case i am clueless on what to do. The intro file is a seperate file from the one i'm trying to load. They were both made using Koolmoves(R).What sort of script could you give me that would preload another swf, while playing the intro.
the intro file is named: intro.swf
the one i'm trying to load is named: home.swf:
johnie
07-01-2003, 07:02 PM
KoolMoves will let you use another Fun file to preload another movie. Just change the option to preload.
However to create a basic preloader do this;
1. Set tweens to 0. Make sure you have disabled the built in Preloader function inside KoolMoves.
2. Create at least 3 frames.
3. add this script to your last frame;
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
if(total_bytes>loaded_bytes)
{
gotoandplay(1);
}
I assume you want to load in intro.swf right?
Well this is pretty easy also. What you will do is follow steps 1 through 3 above but in step 2 create at least 4 frames.
On Key Frame 2 you will use the import SWF as SWF Object.
The ACtion script in step 3 should read like this;
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
if(total_bytes>loaded_bytes)
{
gotoandplay(2);
}
Trobleshooting
If you are having problems first look at;
1. Make sure that both intro.swf and home.swf are in the same directory. If you are previewing from koolmoves make sure you check under prefferences that it is previewing inside the correct directory.
2. Make sure that you have loaded the SWF object on the Second key frame and not the first one (Frame 0).
3. Make sure your tweens are set to 0.
4. Make sure you have turned off the auto preloader function inside KoolMoves.
flashkit.com
Copyright WebMediaBrands Inc., All Rights Reserved.