Jump to content


preloader question?


  • You cannot reply to this topic
1 reply to this topic

#1 saps

    Young Padawan

  • Members
  • Pip
  • 46 posts
  • Gender:Male
  • Location:Earth

Posted 18 February 2008 - 03:07 PM

hey ya'll just a question, i made this preloader and it works good, for the exception of it appears at 50% on screen and when i publish my movie it doesn`t appear at all in the preview even when i refresh the ie.
i use this code:

onClipEvent (load){

total = _root.getBytesTotal();
}
onClipEvent (enterFrame){
loaded = _root.getBytesLoaded();
percent = int(loaded / total * 100);
text = percent + "%";
gotoAndStop(percent);
if (loaded == total){
_root.gotoAndPlay(2);
}
}

whats the better?... to load the second frame or to load the second scene? maybe someone can give me a clue about that problem, why it doesnt appear in ie, and why it appears at 50% when i export the movie.
thanks in advanced

#2 knedl

    Young Padawan

  • Members
  • Pip
  • 243 posts
  • Gender:Male
  • Location:Slovenia
  • Interests:Designing and programing

Posted 25 February 2008 - 06:01 AM

I prefer loading making another scene then once it's done preloading, it just jumps to that scene. To be honest I don't really know what's wrong with the code, could be the disorganized look, it could be there's no var's to store the actual data. Maybe you should try going for a simpler solution:

Example:

myInterval = setInterval(preload, 100);

function preload() {
var current = getBytesLoaded();
var total = getBytesTotal();
var pctLoaded = Math.round(current/total*100);
instance_name._xscale = pctLoaded;


if (current >= total) {
gotoAndPlay ("Main",1);
clearInterval (myInterval);
}
}





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users