# Why's this not working?

**URL:** https://forum.kirupa.com/t/whys-this-not-working/234183
**Category:** flash
**Created:** [July 31, 2007, 10:21am UTC](https://forum.kirupa.com/t/whys-this-not-working/234183 "2007-07-31T10:21:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sean1983uk](https://avatars.discourse-cdn.com/v4/letter/s/ccd318/32.png) [@sean1983uk](https://forum.kirupa.com/u/sean1983uk)
#### Post date: [July 31, 2007, 10:21am UTC](https://forum.kirupa.com/t/whys-this-not-working/234183/1 "2007-07-31T10:21:51Z")

</div>

I’m loading images from an array using the following code on a movieclup button. Trying to assign a preloader to it but its not working!! I know i’m missing something simple!

```auto

loadedImage.loadMovie(images[0]);
            
filesize = loadedImage.getBytesTotal();
loaded = loadedImage.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize)
{
  preloader.preload_bar._xscale = 100 * loaded / filesize;
}
  else
{
  preloader._visible = false;
}

```

The images are loading but the preloader is not showing up.

any help?
