# A tricky problem ?!?

**URL:** <https://forum.kirupa.com/t/a-tricky-problem/10638>\
**Category:** Uncategorized\
**Created:** [January 4, 2003, 8:24pm UTC](https://forum.kirupa.com/t/a-tricky-problem/10638 "2003-01-04T20:24:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ollihimself](https://avatars.discourse-cdn.com/v4/letter/o/eada6e/32.png) [@ollihimself](https://forum.kirupa.com/u/ollihimself)\
**Post date:** [January 4, 2003, 8:24pm UTC](https://forum.kirupa.com/t/a-tricky-problem/10638/1 "2003-01-04T20:24:56Z")

</div>

Hi there…

Again some probs with the preloader…

The preloader works fine using this code

bytes\_geladen = int(\_root.getBytesLoaded())/1024 add " KB geladen";  
bytes\_gesamt = int(\_root.getBytesTotal())/1024 add " KB gesamt";  
prozent = int(\_root.getBytesLoaded() \*100/\_root.getBytesTotal()) add " % geladen";  
if (prozent == “100 % geladen”) {  
gotoAndPlay (3);  
}

the only problem ist that the var that give out the amount of total bytes shows bytes and not KB… get.Bytes.Loaded is functioning properly… any suggestions how i can geht the KB of total bytes to be shown ?!?

---

<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:** [January 4, 2003, 10:31pm UTC](https://forum.kirupa.com/t/a-tricky-problem/10638/2 "2003-01-04T22:31:24Z")

</div>

```auto
bytes_geladen = int(_root.getBytesLoaded())/1024 add " KB geladen";
bytes_gesamt = int(_root.getBytesTotal())/1024 add " KB gesamt";

```

Your problem lies in the fact that you are dividing.

The get **Bytes** Loaded and get **Bytes** Total methods get the bytes. So by dividing by 1024 you are saying that there are 1024kb in 1 byte, but there are really 1024 bytes in 1kb.

So with that said your code will go from dividing, to multiplying, so it is saying that there are 1024 bytes in 1kb.

```auto
bytes_geladen = int(_root.getBytesLoaded())*1024 add " KB geladen";
bytes_gesamt = int(_root.getBytesTotal())*1024 add " KB gesamt";

```

---

<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:** [January 4, 2003, 11:05pm UTC](https://forum.kirupa.com/t/a-tricky-problem/10638/3 "2003-01-04T23:05:01Z")

</div>

mhhh… i wil try out …

thx for ur help

---

<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:** [January 4, 2003, 11:07pm UTC](https://forum.kirupa.com/t/a-tricky-problem/10638/4 "2003-01-04T23:07:23Z")

</div>

Good Luck 🙂
