aii everyone…i have a problem with my preloader…my main swf totally 227 kb…it seem’s not appear as suppose to and this is my code:
1st frame:( i place the prealoder at 1st frame)
stop()
//and on mc preloader itself
onClipEvent (enterFrame) {
loading = _root.getBytesLoaded();
total = _root.getBytesTotal();
percent -= (percent-((loading/total)100)) .25;
per = int(percent);
percentage = per+"%";
if (percent>99) {
_root.gotoAndStop(2);
}
}
so my problem is this preloader not appear emm…can anyone help me
u guy’s can check here for detail
detail
system
July 21, 2004, 11:20am
2
It doesn’t look like you’re actually loading a movie at all there. Is this all the code?
also,
percent = Math.round((loading/total)*100);
is a simpler way to do the percentage, unless yours is using some strange method you didn’t mention. What is the *.25 bit for?
HTH
system
July 21, 2004, 12:38pm
3
put this on the first keyframe:
this.onEnterFrame = function() {
tBytes = Math.round(this.getBytesTotal());
lBytes = Math.round(this.getBytesLoaded());
perc = (lBytes/tBytes);
pText = Math.round(perc*100)+"%"
bar._width = (perc*200);
if(lBytes == tBytes) {
this.gotoAndStop(2);
delete this.onEnterFrame;
}
else {
this.stop();
}
}
where pText is the var of the text box, not instnace name…
and
bar._width = (perc*200);
multiply by the width of your load bar…
system
July 22, 2004, 2:31am
4
tq…for ur response…dude…
but anyway even i follow ur example my preloader still not appear…i don’t know what happen…as u can see herehere
but i’ll figure out…emmmm
system
July 22, 2004, 3:28am
5
Can anyone take look my fla file…maybe something wrong with my code i think
u can download zip file here
thank u in advanced…
system
July 22, 2004, 9:14am
6
Anyone ? can figure out for me…!! i’m totally lost it…
it’s only appear at 98% percent loading status and so on…hah…
really need help with it…?
system
July 23, 2004, 12:48am
8
thanks for ur reply sir…it’s good to have a response from u sir…
i just upload new file u can view my fla here
I hope u can figure out for me sir…i guess something wrong with my code on 3rd frame …???
system
July 23, 2004, 1:15am
9
it’s probably because you’re attaching sound using AS, there for it’s not loaded at the beggining of the movie…what you need to do, is put in an ‘invisible frame’ or one that never gets seen, say the 3rd frame, drag your music sounds in that keyframe, then make the 4th keyframe start with your stuff…change the if statement on your preloader from:
if (bytes_loaded == bytes_total) {
_root.gotoAndStop(3);
}
to:
if (bytes_loaded == bytes_total) {
_root.gotoAndStop(4);
}
Using that method, you skip the third frame, your stuff is preloaded, and your bar will appear correctly…
system
July 23, 2004, 1:46am
10
If i’m using the method u just mention…by dragging sound on the 3rd frame how i’m gonna loop sound…and control sound …
Maybe i have to load sound first and then load the rest…what u think?i 'll try it…?
anyway tq for ur response…
system
July 23, 2004, 7:27am
11
arghh still lost it…where are the as GURU’s gone…he…he…
system
July 23, 2004, 8:46am
12
system
July 23, 2004, 10:24am
13
yes…finally my miserable dream has dissapear he…he…really big thanks to macneilslt…ur example fla really help me…thank u …
i notice that my file are so small in size that’s why the preloader doesn’t appear at all…my mistake… anyway tq again…
peace…