I need your help people. your talking about preloaders. I have this code, and i want the preloader to fade once the movie has been loaded. here's the code
Code:
myInterval = setInterval(preload,100);
function preload(){
var current = _root.getBytesLoaded();
var total = _root.getBytesTotal();
var pctLoaded = Math.round(current/total*100);
pct_txt.text = pctLoaded;
loaderBar_mc._xscale = pctLoaded;
if(current >= total){
gotoAndStop("main",1);
clearInterval(myInterval);
}
}
Im going to say that you have your preloader IN the .swf you are trying to preload? is this correct?
Whispers,
I was hoping that he was going to say "yes", because I am having trouble with a preloader not even appearing. My preloader is basically code on the first couple of frames of a large swf, so my preloader IS in the swf I'm trying to preload. What would your suggestion to spendirty have been if he had answered like me?
i need some help with the preloader that i made. i followed one of the tutorials that i found on flashkit that displays messages (instead of a percent bar) for the viewers to read while the site is loading.
although when i uploaded it, it gets stuck on just the first message and doesn't even open to the actual site... so it just shows the preloader the whole time!
the movie clip called 'text' didn't have an instance name of 'text' . Thats why it won't work i presume..
I attached your file .. and it works now
Hi Irkev, for some reason i couldnt open the file you sent. perhaps its because i have an old version of flash.
in any case, i did what you suggested and now the messages are playing properly.. however, it doesnt go to the main movie, so its stuck playing the preloader.. what can i do to fix this?
but actually, on the preloader scene, you frame stops at 24!!
also, rename scene 1, to main ! ! then try
total = _root.getBytesTotal();
loaded = _root.getBytesLoaded();
if (loaded>=total) {
gotoAndPlay("main",1)
}
let me know what happen
don't put the _root.gotoAndPlay("main",1) , just gotoAndPlay("main",1)
or try
var amountLoaded = _root.getBytesLoaded()/_root.getBytesTotal()*100;
if (amountLoaded>=100) {
gotoAndPlay("main",1)
}
Hi again irkev,
I changed Scene 1 to main and tried both of the codes you suggested, however, the site still gets stuck at the preloader.
i also extended the preloader to 100 frames, so that theres more time for each quote to be read.
the actual swf file that i uploaded is 8,364KB. i dont suppose thats too big for it to take forever to load?
could the problem be with the main movie? i have videos embedded in it.
or is it just with the code of my preloader?
thanks so much for helping so far really appreciate it!
I have a question, is it possible to add kerning (letterspacing) in-between the numbers in a preloader? For example lets say I have a preloader that counts to 45 and i have two circles sitting side by side not overlapping. How would i go about adding a space in-between the numbers to have the number on the left in the left circle and the number on the right in the right circle?
Im using Flash CS3 AS 1.0 & 2.0. I want to make a preloader for my website. I have the initial preloader to the website worked out. But I want a preloader for when someone clicks on my images. What would be the AS? Does the preloader have to be on the keyframe before the image that is being preloaded or can it be on the same keyframe? The latter way to do it is preferred. All preloaders I've been checking out only deal with the first initial preloader and NOT for using it multiple times, etc. Can anyone help? Thanks!!!
With the first original post, I took a look at the link to the tutorials I'm not sure if those do this or not...
Do the tutorials preload everything in the library such as sound effects, movie clips, etc.? Whenever I have a sound effect in my game it stops to load it when it plays for the first time.
Very nice thread. One question and it's been bothering me. Can we determine a percent amount to preload before playing a movie? So let's say i only want 30% of the movie to preload before playing it.
30% was just a number I threw out there. I work with a client who has this "guideline" for there Flash ads, landing pages and/or anything with flv. The flash movies can only pre-load a certain amount before they have to begin. I would be able to increase or decrease the pre-load amount depending on the size of the Flash peice.