Skip to Content »

FlashApe » Loading Images in Mac IE

 Loading Images in Mac IE

  • August 17th, 2004
  • 9:13 pm

I dont know if anyone has ever run into this problem, but it has hapeened to me on two different sites, and it has driven me crazy. Something about trying to load an image into Flash on IE for Mac acts a little funny. It seems that the code inside a preloader would not fire correctly once the image was fully loaded….so in the following code, the clip img_mc would not move into its new position, but the trace would execute:

bc[as]. picHolder.onEnterFrame = function(){
if (this.img_mc.getBytesLoaded() == this.img_mc.getBytesTotal()
&& this.img_mc.getBytesLoaded() > 5){
trace (”done”)
//right-align the clip
this._x = 785 - this._width;
delete this.onEnterFrame;
}
}

Now, this would only hapen occasionally, and randomly. Most of the time it would work fine exactly as it should, and for the life of me I could not figure out why this was happening. After trying many different angels to try and fix the problem and getting totally stressed out over it, I finally came up with the soltion:

Use setInterval to check the load progress instead of onEnterFrame.

Durr! I could kick myself.

Nearest I could tell is that the flash player for mac needs at least one frame to pass in the movie before checking the properties of the loaded clip.

Want your say?

* Required fields. Your e-mail address will not be published on this site


You can use the following XHTML tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>