More preloader misery (yes I know it's boring)

Well we all have to learn.

I use a variable to show the percentage loaded number in a dynamic text box. The problem I have is that it only works when there is more than 1 frame in the preloader scene.

My guess is, that when there is only one frame, the code is not being refreshed to update the text box.

ie

var percentage;
percentage = math.round( getBytesLoaded() / getBytesTotal() * 100);

can someone please sort me out

Thanks

geoff

did you name the dynamic text box “percentage”? if so, then you don’t need “var percentage;”.

that makes percentage a local variable and not the one you want.

also, don’t forget to include the font itself (numbers, punctuations, letters if need be). that is a common thing that happens.

<marquee width=21 behavior=alternate>:hat:</marquee>

I did use var, I shall try out your suggestions

Thanks

Geoff