At 11/18/05 09:30 PM, Matomic wrote: Ok, to the point, I SAID to make rounding and approximation and stuff so that it would NOT be jumpy, because the jumpiness is the problem. Fix THAT, and you are my hero.
Also, being a noob to a.s. I don't know what the text-box variable is for all that script...
you cant control the speed something downloads at, i tried getting the average but it still jumps around.
stop();
_root.alreadyLoaded = _root.getBytesLoaded();
_root.timeLeftTotal = _root.timesAdded = 0;
onEnterFrame = function () {
dSpeed = _root.getBytesLoaded() - alreadyLoaded;
alreadyLoaded = _root.getBytesLoaded();
_root.timeLeftTotal += int(_root.getBytesTotal() / dSpeed);
_root.timesAdded++;
};
Stage.showMenu = false;
setInterval(function () {
timeLeft = _root.timeLeftTotal / _root.timesAdded;
secondsLeft = timeLeft % 60;
minutesLeft = (timeLeft - secondsLeft) / 60;
_root.displayTime = minutesLeft + ":" + (secondsLeft < 10 ? "0" : "") + secondsLeft + " Minutes remaining";
_root.timeLeftTotal = _root.timesAdded = 0;
//updateAfterEvent();
}, 1000);
thats the best i can do. it'll probly run alot smoother on a real download instead of the simulated one