Hi there,
I’m using a simpel preloader script that holds the movie on frame 1, and plays frame 2 when everything is loaded.
I used this script before without any problems, but for some reason the textfield with the “loading”-text only shows up at exactly 50% :-/
There are no other objects/movieclips/textfieds except this one “loading”-text on frame 1. When I trace the ‘update()’-function, it traces once at the beginning of the script, holds, and than traces as it should after 50%…
Here’s my code at frame 1:
stop();
preloaden();
function preloaden(){
preloadingInterval = setInterval(update, 1);
}
function update(){
trace("update()-function");
if(getBytesLoaded() < getBytesTotal()){
percentageLoaded = Math.round((getBytesLoaded() / getBytesTotal() * 100) + 1)
txt_loading.text = percentageLoaded + "%";
trace(percentageLoaded);
} else {
clearInterval(preloadingInterval);
gotoAndPlay("loaded");
}
}