This is my code in a movieclip which is loaded on the main timeline and the duplicated.
Its task is to load an image and i want to show the loading process.
temp is a textfield which should show the loading progress.
but it says 0% then "infinity"and finally 100% but nothing in between.
What is the problem???
this.createEmptyMovieClip(“preloader”, 1000);
this.createEmptyMovieClip(“container”, 1001);
container.loadMovie(“images/” add imagename);
container._visible = false;
preloader.onEnterFrame = function() {
var l = container.getBytesLoaded();
var t = container.getBytesTotal();
var getPercent = l/t;
temp = Math.round(getPercent*100)+"%";
if (l>0 && l>=t) {
container._visible = 1;
delete this.onEnterFrame;
}
};