Ok, so im loading swf's into a movieclip in my mainmovie and displaying the percent loaded for the viewer. now this all works just fine on any PC i have tested, HOWEVER, it seems to return a negative number for a split second on macs.
this is the code i was using
sectionloader.onenterframe=function() { _root.p.percent = int((holder.getBytesLoaded()/holder.getBytesTotal())*100); }
i have changed it to this to try and not allow negative numbers to be displayed, but it still seems to do it.
sectionloader.onenterframe=function() { if(_root.p.percent<0) { _root.p.percent=0; }else{ _root.p.percent = int((holder.getBytesLoaded()/holder.getBytesTotal())*100); } } I feel as if there is a split second between the time the old movie unloads and the new one initializes and this is why im getting hte negative numbers, so what would be the best course of action folks?
should i restrict the textfield to NOT allow negatives?
just ignore the mac people...

you should probably calculete the value of p first, and then check if it's zero like so:
sectionloader.onEnterFrame=function(){ var p=int((holder.getBytesLoaded()/holder.getBytesTotal())*100); if(p<0){ _root.p.percent=0; }else{ _root.p.percent = p; } }
this way you will never post a negative value
I have noticed this problem, it seems to be because the MAC takes a few moments to start loading the swf
The above should work, or you could try
sectionloader.onEnterFrame=function(){
if(holder.getBytesTotal()>0){
_root.p.percent=int((holder.getBytesLoaded()/holder.getBytesTotal())*100);
}
}