Hi guys,
I’m using BulkLoader for loading a background image and an image.
When the preload start it makes strange movement instead of going straight to the end.
If you don’t understand you can see it live here: http://www.sltrading.it/alborgoantico
This is very annoying because i don’t know what is the problem unless it’s a library (bulkloader) problem (i hope no :red: ).
Here the code for the preloading:
loader.add("foto.jpg",{id:"item2"});
loader.add("background.jpg",{id:"sfondo"});
loader.addEventListener(ProgressEvent.PROGRESS, onItemProgress);
loader.addEventListener(Event.COMPLETE, onItemComplete);
loader.start();
function onItemProgress(e:ProgressEvent)
{
var offset:Number = Math.floor(241*e.bytesLoaded/e.bytesTotal);
TweenMax.to(bar, 0.5, {width:offset});
}
bar it’s a sprite within the graphic of a generic preload bar.
Maybe is the use of the TweenMax? I use it for a smooth preload.
Please help me guys :hr: