image preloader not working

  • panzhuli
  • Graduate
  • Graduate
  • panzhuli
  • Posts: 135
  • Loc: Cleveland

Post 3+ Months Ago

Can someone tell me why this isn't working with as 1.0? I have to publish it with 1.0 for other reasons. basically i want a simple preloader:

var filename = "largeImage.jpg";
//Load the image
image_holder_mc.loadMovie(filename);

this.onEnterFrame = function(){
percent=(this.image_holder_mc.getBytesLoaded()/this.image_holder_mc.getBytesTotal())*100;
trace (percent);
if(!isNan(percent)){
trace(percent+'% loaded');
}else{
trace('0% loaded');
}
if(percent == 100){
delete this.onEnterFrame;
infoField._visible = false;
image_holder_mc._xscale = 25;
image_holder_mc._yscale = 25;
image_holder_mc._x = x_offset;
image_holder_mc._y = y_offset;
}
};

anyone? it goes straight to 100% when viewed through the download simulator, but the image isn't actually loaded. I don't really know as 1.0, just 2.0. thanks! The image loads just fine, but the percentage isn't related to the status of the load...
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

try putting it online and see if it works. I've had a lot of times where the download simulator won't get preloaders correct.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 3 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.