# Preloader+jpg

**URL:** <https://forum.kirupa.com/t/preloader-jpg/177428>\
**Category:** Uncategorized\
**Created:** [February 1, 2006, 9:34pm UTC](https://forum.kirupa.com/t/preloader-jpg/177428 "2006-02-01T21:34:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rille31](https://avatars.discourse-cdn.com/v4/letter/r/a4c791/32.png) [@rille31](https://forum.kirupa.com/u/rille31)\
**Post date:** [February 1, 2006, 9:34pm UTC](https://forum.kirupa.com/t/preloader-jpg/177428/1 "2006-02-01T21:34:54Z")

</div>

Hi guys  
I got a little problem preloading swffiles that Im loading into a main movie where there is a loading clip.  
In the clips Im loading in Im also loading in images(jpg).  
So Im loading in a clip and in that clip I have a empty mc that Im loading in a image.  
When the clips including images are loaded I want the clip to play and fade in but the images arent calculated in the code and sometimes arent loaded before the fade.

code in external swf

```auto

imageContainer.loadMovie("bgImages/about.jpg");
stop();

```

Code in the main clip preloader and timeline

```auto

//timeline
_root.main.container.loadMovie(_root.nextFilm);
//preloaderMc
onClipEvent (load) { 
percent = 0;
}
onClipEvent (enterFrame) { 
loading1 = _root.main.container.getBytesLoaded(); 
loading2 = _root.main.container.imageContainer.getBytesLoaded(); 
loading = loading1+loading2; 
total1 = _root.main.container.getBytesTotal(); 
total2 = _root.main.container.imageContainer.getBytesTotal(); 
total = total1+total2; 
percent -= (percent-((loading/total)*100))*.50; per = int(percent); 
loadBar._width = per; 
if (percent>99) { 
_root.main.container.play(); 
   }
}

```
