Hi! Im going crazy! It seems no matter how I try to get the bytes loaded and total, its not getting them. Here’s the code Im referring to…
function load_pic(myLoad, myNum:Number)
{
//this loads the picture into backpics
_root.mc_backpics["img" + myNum].loadMovie(myLoad);
//this is what I cant get working. myLoad isnt referencing the file I think
total = myLoad.getBytesTotal();
loaded = myLoad.getBytesLoaded();
percent = int(loaded/total*100);
_root.backpicloader._visible = true;
_root.mc_backpics["img" + myNum]._alpha = 0;
_root.backpicloader.backnum.text = myNum;
if (loaded >= 5 && loaded < total)
{
_root.backpicloader.text = percent;
} else
if (loaded == total)
{
//_root.backpicloader._visible = false;
_root.mc_backpics["img"+ myNum].swapDepths(_root.mc_backpics["img"+prior]);
_root.mc_backpics["img" + myNum].myPic._height = _global.maxresY;
_root.mc_backpics["img" + myNum].myPic._width = _global.maxresX;
_root.mc_backpics.onEnterFrame = function()
{
if(_root.mc_backpics["img" + myNum]._alpha<=100)
{
_root.mc_backpics["img" + myNum]._alpha+=fadespeed;
}
};
}
prior = myNum;
//_root.mc_backpics.img0._visible = false;
};
Ive attached the source. Can someone please look at it and help? Ive removed the other parts of the movie that are not relevant.
You will notice that the percent is not updating. The script continues because loaded equals total. Zero.
Thanks a million!
Rich