# Pre loading problems \[SORRY!\]

**URL:** https://forum.kirupa.com/t/pre-loading-problems-sorry/13408
**Category:** flash
**Created:** [February 12, 2003, 11:48pm UTC](https://forum.kirupa.com/t/pre-loading-problems-sorry/13408 "2003-02-12T23:48:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Kel\_420](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@Kel\_420](https://forum.kirupa.com/u/Kel_420)
#### Post date: [February 12, 2003, 11:48pm UTC](https://forum.kirupa.com/t/pre-loading-problems-sorry/13408/1 "2003-02-12T23:48:06Z")

</div>

Ok OK Don’t hate me. I know this topic has been done to death on more than one occasion.  
I have been looking over various threads and tuts but come up empty handed.

If you click _Gallery_ it loads the thumbnails in a new MC on the main stage.  
Now, if you click one of the thumbnails it dynamically loads the .jpg with this code:

```php

on (release) {
_root.createEmptyMovieClip("container",1);
container.loadMovie("vo01.jpg");
container._x = 55; container._y = 200 ;
}

```

As some people will be on dial-ups, I want to be able to use a progress bar or % as a visual for them. So, I have used this code: [Found it in a thread here someplace]

```php

this.onEnterFrame=function(){
percent= Math.round((contain.getBytesLoaded()/contain.getBytesTotal())*100);
per.text = percent+"% loaded";
LoadingBar._width = percent;
}

```

I have a movie clip called _LoadingBar_ and a dynamic text box called _per_ on the MAIN stage.  
The image loads but it doesn’t give a % or bar. What am I doing wrong? All the code together looks like this:

```php

on (release) {
percent= Math.round((contain.getBytesLoaded()/contain.getBytesTotal())*100);
per.text = percent+"% loaded";
LoadingBar._width = percent;	
_root.createEmptyMovieClip("container",1);
container.loadMovie("vo01.jpg");
container._x = 55; container._y = 200 ;
}

```

Thanx in advance.
