# Loading 2 .jpg with pop-up

**URL:** <https://forum.kirupa.com/t/loading-2-jpg-with-pop-up/45528>\
**Category:** Uncategorized\
**Created:** [March 15, 2004, 4:31pm UTC](https://forum.kirupa.com/t/loading-2-jpg-with-pop-up/45528 "2004-03-15T16:31:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neuhaus3000](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/neuhaus3000/32/168_2.png) [@Neuhaus3000](https://forum.kirupa.com/u/Neuhaus3000)\
**Post date:** [March 15, 2004, 4:31pm UTC](https://forum.kirupa.com/t/loading-2-jpg-with-pop-up/45528/1 "2004-03-15T16:31:18Z")

</div>

Hello everyone,

I would like to have 2 .jpg dynamically loaded on my main timeline.

I have this code for one jpg.

==============================================

this.createEmptyMovieClip(“preloader”, 1000);  
this.createEmptyMovieClip(“container”, 1001);  
container.loadMovie(“myimage.jpg”);  
this[“container”].\_x = 10;  
this[“container”].\_y = 10;  
this[“container”].\_xscale = 10;  
this[“container”].\_yscale = 10;  
container.\_visible = false;

preloader.onEnterFrame = function() {  
var l = container.getBytesLoaded();  
var t = container.getBytesTotal();  
var getPercent = l/t;  
loadText = Math.round(getPercent_100)+"%";  
loadBar.\_width = getPercent_100;  
if (l\>0 && l\>=t) {  
container.\_visible = 1;  
delete this.onEnterFrame;  
}  
};

==============================================

How can I modify the code for 2 images? Can I use the same preloader?

How can I convert the images to buttons so that they can open a pop-up window? (a html page would open with the full length pic and some text).

Any ideas would be truly appreciated :ne:

neuhaus3000
