[MX] Rounding off numbers

Hi, i’ve tried making a preloader (without any tutorials) by myself, i’ve done everything, just i’ve done this:

named text box varibal: loaded

on the maintimeline’s first frame i enter:

loaded=_root.getbytestotal();

all i want to do now is round the bytes off to KB. i Assume you multiply by 1000 but where do i put this code? in the brackets? new line? or what. HELP!! :slight_smile:

-Michelle

loaded = Math.round(_root.getBytesLoaded()/1000)

that should work.

*Originally posted by Jubba *
**loaded = Math.round(_root.getBytesLoaded()/1000)

that should work. **

thanks alot, it worked perfectly.

dunno if you’re still working on this:
technically, you would need to multiply by 1024, not 1000. 1 kb is 1024 bytes. Not to be anal, but that’s how it is.

its been discussed
http://www.kirupaforum.com/showthread.php?s=&threadid=12157