# MX - variables - progress bar

**URL:** <https://forum.kirupa.com/t/mx-variables-progress-bar/19060>\
**Category:** flash\
**Created:** [April 23, 2003, 10:03pm UTC](https://forum.kirupa.com/t/mx-variables-progress-bar/19060 "2003-04-23T22:03:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnonymousCaller](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@AnonymousCaller](https://forum.kirupa.com/u/AnonymousCaller)\
**Post date:** [April 23, 2003, 10:03pm UTC](https://forum.kirupa.com/t/mx-variables-progress-bar/19060/1 "2003-04-23T22:03:15Z")

</div>

I am struggling with trying to deal with variables & loading.

I have two movies:

one - is the Player - it has a progress bar, much like preloading bar. it gets these from…

two - the footage it has a looping MC in it that runs the progress bar with the following code:

[SIZE=1][COLOR=seagreen] bytes\_loaded = Math.round(\_root.movie.getBytesLoaded());  
bytes\_total = Math.round(\_root.movie.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
\_root.loadBar.\_xscale = getPercent_100;  
\_root.loadText = Math.round(getPercent_100)+"%";[/COLOR] [/SIZE]

You have to constantly refresh the values; hence the loop.

I need to move this to the main movie. Did I mention that this is all loaded dymanically? movieName=“video1.swf”

Can I swap the \_root.movie.getBytes… with the variable so that it’ll gauge the progress of the load? Haven’t figured out have to make it actually work.

The next logical step is to have an icon that shows where the viewer is in the movie. If anybody has a clue how to do that, that would also be helpful.

AC

[http://www.mdbprojects.net/interface2.html](http://www.mdbprojects.net/interface2.html)

---

<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:** [April 24, 2003, 11:18am UTC](https://forum.kirupa.com/t/mx-variables-progress-bar/19060/2 "2003-04-24T11:18:21Z")

</div>

is this sort of what you are looking for?

markcq:alien:

---

<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:** [April 24, 2003, 4:59pm UTC](https://forum.kirupa.com/t/mx-variables-progress-bar/19060/3 "2003-04-24T16:59:41Z")

</div>

markcq-

Thanks for the script. Unfortunately, that won’t work for a couple of reasons. It’s preloader script in that it doesn’t let you watch the loading movie as it loads. If you go to my link yo ucan see how it actually starts to play as it loads. Since there is not \_root.gotoThe progress - and I mean progress not preload - bar measures the precentage loaded and sends that # to the parent movie to appear on the loadBar.  
What I need is to figure out how to measure the loading of the child movie from the parent movie.

Any ideas?  
AC

---

<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:** [April 25, 2003, 1:43pm UTC](https://forum.kirupa.com/t/mx-variables-progress-bar/19060/4 "2003-04-25T13:43:40Z")

</div>

you want to movie to “stream” while its loading you want it to play as well?

i checked the link out… i get what you are trying to do…

don’t know if this will help… just a thought…

if you put the movie in an external flash file (another .swf file) and place it into the main movie with the loadMovieNum function

example:  
loadMovieNum(“movie.swf”, 2);  
//2 will set the z-index of the movie

could you link the percentage with the movie.swf file size (getBytesTotal(); and getBytesLoaded();)?

i still think a preloaded might work better. movies with sound is even slower so i don’t know how this will work??? if it was text based or flash graphics then its easier to “stream” it…

_sigh_ dunno either… maybe this sparks some new thought…

good luck  
👽
