Bulk Loader and SWF Caching issues

while working with bulk loader on a big project recently, we were hit by one problem that took me a while to solve.
the problem was basically this: if you load an swf with bulkloader, everything looks fine and well..
unload it, try to load it again and it won’t load.. simply becase it is already in the cache of the browser , so the COMPLETE event was never firedthe second time.

I tried to set the {forceCache:false} in the case of loading an swf and that didn’t work also (it added a random string number after the name of the swf, and the container flash won’t load the swf at all in that case)

so.. here is the result of a full day of investigation

if (loader.hasItem(this.id[0] , true))
{
	loader.remove(this.id[0]);
}
loader.add(this.bg[0], { id:this.id[0]} );	

this way, the onComplete event will get fired after loading the swf for the second time, even though it’s already loaded and present in the cache

simple.. yet not documented properly

  1. jo says:

    Thx Omar,

    Works big time!

    grt, jo

  1. There are no trackbacks for this post yet.

Leave a Reply