Loading bar not working when uploaded on the net?

got a quick qustion, my loading bar works fine when i try them in the swf, but when i put them online, they stop working properly.

should i put a stop() script on the last frame of the loading bar?

the script i used is this, please help me on this one:

frame1:
var ammountLoaded:Number = _root.getBytesLoaded()/_root.getBytesTotal();
loadText.text = Math.round(ammountLoaded100);
preloader._width = ammountLoaded
994;

frame2:
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
gotoAndPlay(3);
} else {
gotoAndPlay(1);
}