Flash 6->8 changes

I need some help on what doesn’t work in Flash 8 in this code. It’s a rotation loader. For some reason Flash doesn’t update the loaded/total and ‘per’ values.

Frame 1:
total_bytes = Math.round(_root.getBytesTotal()/1024);
loaded_bytes = Math.round(_root.getBytesLoaded()/1024);
percent -= (percent-((loaded_bytes/total_bytes)*100))*0.25;
per = Math.round(percent);
if (per<=50) {
_root.mask1.maske._rotation=-(360/100)per;
} else {
_root.mask1.maske._rotation=-180;
_root.mask2.maske._rotation=-(360/100)
(per-50);
}

Frame 2:
if (per>=100) {
gotoAndPlay(3);
} else {
gotoAndPlay(1);
}