# \[MX\] Rounding off numbers

**URL:** https://forum.kirupa.com/t/mx-rounding-off-numbers/13616
**Category:** flash
**Created:** [February 15, 2003, 4:29pm UTC](https://forum.kirupa.com/t/mx-rounding-off-numbers/13616 "2003-02-15T16:29:17Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Tomoko\_Sasaki](https://avatars.discourse-cdn.com/v4/letter/t/51bf81/32.png) [@Tomoko\_Sasaki](https://forum.kirupa.com/u/Tomoko_Sasaki)
#### Post date: [February 15, 2003, 4:29pm UTC](https://forum.kirupa.com/t/mx-rounding-off-numbers/13616/1 "2003-02-15T16:29:17Z")

</div>

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!! 🙂

-Michelle

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 15, 2003, 4:36pm UTC](https://forum.kirupa.com/t/mx-rounding-off-numbers/13616/2 "2003-02-15T16:36:59Z")

</div>

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

that should work.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 15, 2003, 4:45pm UTC](https://forum.kirupa.com/t/mx-rounding-off-numbers/13616/3 "2003-02-15T16:45:36Z")

</div>

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

that should work. \*\*

thanks alot, it worked perfectly.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 21, 2003, 6:02am UTC](https://forum.kirupa.com/t/mx-rounding-off-numbers/13616/4 "2003-02-21T06:02:30Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 21, 2003, 11:39am UTC](https://forum.kirupa.com/t/mx-rounding-off-numbers/13616/5 "2003-02-21T11:39:02Z")

</div>

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