# Preloader for .jpg in extrnal .swf

**URL:** <https://forum.kirupa.com/t/preloader-for-jpg-in-extrnal-swf/254285>\
**Category:** Uncategorized\
**Created:** [March 10, 2008, 4:36pm UTC](https://forum.kirupa.com/t/preloader-for-jpg-in-extrnal-swf/254285 "2008-03-10T16:36:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kubana](https://avatars.discourse-cdn.com/v4/letter/k/d2c977/32.png) [@kubana](https://forum.kirupa.com/u/kubana)\
**Post date:** [March 10, 2008, 4:36pm UTC](https://forum.kirupa.com/t/preloader-for-jpg-in-extrnal-swf/254285/1 "2008-03-10T16:36:06Z")

</div>

Hello chaps!  
I have this problem. I have preloader - very simple thing. It works in mine file . But than I want to load gallery ( external.swf ) which will load photos. Now the deal is that I want to have preloader for the photos. I did it but have no idea where the issue is. It doesn’t work.

here is the code:

```auto
//Gets the percent loaded and assigns it to the variable x
var x = _root.getBytesLoaded()/_root.getBytesTotal()*100;
//Scales the FillBar to the percent loaded
FillBar._xscale = x;
//Rounds the percent and displays it in the text box
loaded = Math.round(x) + "%";
//If the movie is loaded, play
if (x>=100) {
	_root.play();
}

```

It works on the main movie when the website start.  
Is there a path issue?  
I don’t know where shoul I place the preloader ( it is as movie clip ) - on the timeline of gallery scene or on the timeline of gallery.swf

Please help!

Thank you
