I use this code to display the progress of the jpeg im loading dynamically into my empty movieclip, bildholder.
bytes_loaded = Math.round(bildholder.getBytesLoaded());
bytes_total = Math.round(bildholder.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
loadpic = “_loading_product “+Math.round(getPercent*100)+” % loaded”;
if (bytes_loaded >= bytes_total) {
gotoAndPlay(“done”);
}
The problem is that I cant get the line:
bytes_total = Math.round(bildholder.getBytesTotal());
to work. It seems that Flash have a problem getting the TotalBytes for a dynamically jpeg.
When i set bytes_loaded to a fix number, say 5000, then the preloader works but not wgen I use the command .getBytesTotal()
Can anyone tell me why or how I can solve this problem.