# Music Load Question

**URL:** <https://forum.kirupa.com/t/music-load-question/93341>\
**Category:** Uncategorized\
**Created:** [October 29, 2003, 4:11pm UTC](https://forum.kirupa.com/t/music-load-question/93341 "2003-10-29T16:11:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![neverrain](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@neverrain](https://forum.kirupa.com/u/neverrain)\
**Post date:** [October 29, 2003, 4:11pm UTC](https://forum.kirupa.com/t/music-load-question/93341/1 "2003-10-29T16:11:42Z")

</div>

Ok I have a sound Object on the \_root timeline that plays when the page loads, that works great.

I want to preload it so that the user can see the % of it loaded. Here is my code:

[AS]\_root.backgroundMusic.bytes\_loaded = Math.round(\_root.getBytesLoaded());  
\_root.backgroundMusic.bytes\_total = Math.round(\_root.backgroundMusic.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
loadedBox = Math.round(getPercent\*100)+"%";[/AS]

The Object is names backgroundMusic it is a sound Object (duh).

When I enter that code I get a “NaN%” in the dynamic text box named loadedBox

Thanks.:cap:
