Skip to main content
gamedev.net
🔒 Locked

[java] Tracking Image Load Time

Started by ao 1 reply 400+ views
Original Post
ao
ao
How would I go about figuring out how much of an image or group of images has been loaded. I looked at mediaTracker but it only wants to tell you if something is still loading, not how much it has loaded. I also looked at ImageObserver, but I''m not to sure about that yet. There must be a way to do this because I''ve seen plenty of java applets with progress bar indicators updating as they load. Thanks, ao
bobbin
bobbin
MediaTracker _is_ the right class to use! I guess most people know how many images need to be loaded & just loop round the mediatrackers elements counting them off (as their status becomes LOADED (i guess))...
ao
ao
Well, I was thinking about doing that way for the first batch of graphics that I need to load. But, where my problem occurs is, I have to load ( at an unknown time ) one large image. That would mean the bar would jump from 0 to 100% instantly when its done, making it useless.

I think I will just put some silly little animation in that keeps looping itself and says "Please wait, loading graphics!" or something like that.

Thanks,
ao

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.