# Movie & External Image in 1 Preloader?

**URL:** https://forum.kirupa.com/t/movie-external-image-in-1-preloader/133304
**Category:** Uncategorized
**Created:** [January 7, 2005, 10:20am UTC](https://forum.kirupa.com/t/movie-external-image-in-1-preloader/133304 "2005-01-07T10:20:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![modifier](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@modifier](https://forum.kirupa.com/u/modifier)
#### Post date: [January 7, 2005, 10:20am UTC](https://forum.kirupa.com/t/movie-external-image-in-1-preloader/133304/1 "2005-01-07T10:20:08Z")

</div>

Hi to all,

i’m trying to load a jpg dynamicaly into my flash movie and  
integrate the preload process/state into  
my existing preloader. (using the Smooth Prealoder)

My problem is, the preloader only recognizes the mainmovie  
(the size of the main swf / 17 KB) and ignores the size of the jpg.  
The result, when the movie has finished loading,  
it starts playing without having finished  
preloading the jpg.

Here’s my try:[left]

```auto
 [left]stop();
function preLoad(what):Void {
		var percent:Number = 0;
		var total:Number;
		var loading:Number;
		var per:Number;
		var loader_mc:MovieClip = createEmptyMovieClip("l",500);
		loader_mc.onEnterFrame = function() {
				
				// here i'm trying to load that jpg
				// but the preloader ignores it :-(
				
				createEmptyMovieClip("looper", 10);
				looper.loadMovie("1.jpg",1);
				
				loading = getBytesLoaded();
				total = getBytesTotal();
				percent -= (percent - ((loading / total) * 100)) * .25;
				per = int(percent*1.5);
				load_mc.loadBar._width = per;
				if (percent > 99) {
						delete this.onEnterFrame;
						play();
				}
		};
}
preLoad(this);[/left]

```

[/left]  
[left] [/left]  
[left]So how can i make the preloader preloading the movie  
AND the jpg and THAN starts to continue to frame 2??

Thanks in advance!

regards  
mod[/left]
