Why can't a preloader be done like this!?


do{
// code to enlarge the preloader bar!
}while(picture.getBytesLoaded() < picture.getBytesTotal())

why can’t a preloader be done like this!??