why wont this work......

if (getBytesLoaded() == getBytesTotal())
{

gotoAndPlay(3);

}
else
{

loaded = getBytesLoaded();
output = ((getBytesLoaded()/getBytesTotal())*100);
outputFrame = getBytesTotal();

}

the variable output is the textbox that displays the percent loaded

It only goes to like 99.9 percent, so annoying, i thought if i put the loaded in the if statement it would work, but obviously it wont show the actual progression of the percent loading.......

PLEASE HELP ME :P