# getBytesLoaded and getBytesTotal isnt getting! Please help

**URL:** https://forum.kirupa.com/t/getbytesloaded-and-getbytestotal-isnt-getting-please-help/240771
**Category:** flash
**Created:** [October 5, 2007, 11:25pm UTC](https://forum.kirupa.com/t/getbytesloaded-and-getbytestotal-isnt-getting-please-help/240771 "2007-10-05T23:25:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![RichGags](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/richgags/32/685_2.png) [@RichGags](https://forum.kirupa.com/u/RichGags)
#### Post date: [October 5, 2007, 11:25pm UTC](https://forum.kirupa.com/t/getbytesloaded-and-getbytestotal-isnt-getting-please-help/240771/1 "2007-10-05T23:25:11Z")

</div>

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…

```auto

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
