Hi
I am loading an image into a holder clip (holder2) off stage and then loading it into a display clip (holder) when fully loaded
here is the code
Code:
function imageLoader(image2load) {
//load image into holder clip
holder2.loadMovie(image2load);
//show loader mc
_root.loader.gotoAndStop("on");
_root.loader.indicator.onEnterFrame = function() {
bytesLoaded = holder2.getBytesLoaded()/1024;
//this is not returning any value
bytesTot = holder2.getBytesTotal()/1024;
//if I specify the bytesTotal it works
//bytesTot = 340;
if (bytesTot>5) {
percent = int((bytesLoaded/bytesTot)*100);
_root.loader.indicator.percent.text = percent+"%";
}
if (bytesLoaded>=bytesTot && bytesTot>1) {
//place image into display clip
holder.loadMovie(image2load);
//hide loader
_root.loader.play()
delete this.onEnterFrame;
}
};
}
imageLoader("images/home.jpg")
The getBytesTotal request does not return any value, the code works cos if I hard code the value the loading works???
Any ideas? is there a setting on the server that needs to be set to allow this to work??