It basically keeps taking the first element out of the array, preloads it, then shifts that spot in the array (ie shift removes the first indx) until there are no more elements within the array itself).
--
Regards, Scott Barnes - http://www.mossyblog.com http://www.bestrates.com.au
Steve Onnis wrote:
Arr yes
but is it suposed to be always [0]?
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Scott Barnes Sent: Monday, April 19, 2004 1:12 PM To: CFAussie Mailing List Subject: [cfaussie] Re: JavaScript, Image, onLoad bug? I Challenge you to fix this.
Steve Onnis wrote:
Scott
Just wanted to clarify something
//////////////////////////////////////////////////////////////// LoadScreen.prototype.preloadAssets = function(IsArrayFreshlNew) {
if(!IsArrayFreshNew) { this.aAssetsToLoad.shift(); }
if(this.aAssetsToLoad.length <= 0) { this.aAssetsToLoad = new Array(); return null; }
var currentAsset = this.aAssetsToLoad[0]; var oImage = new Image();
oImage.controller = this; oImage.onload = this.onLoadAsset; oImage.id = currentAsset.id; oImage.src = currentAsset.uri; } ////////////////////////////////////////////////////////////////
this, to me doesnt look right
this.aAssetsToLoad[0].length looks like its always 0
No, its this.aAssetsToLoad.length ie no idea where this.aAssetsToLoad[0].length comes into play ?
--
Regards, Scott Barnes - http://www.mossyblog.com http://www.bestrates.com.au
--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004
--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004
