# Kirupa gallery customized question

**URL:** <https://forum.kirupa.com/t/kirupa-gallery-customized-question/222624>\
**Category:** Uncategorized\
**Created:** [April 15, 2007, 3:23pm UTC](https://forum.kirupa.com/t/kirupa-gallery-customized-question/222624 "2007-04-15T15:23:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Casenote](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@Casenote](https://forum.kirupa.com/u/Casenote)\
**Post date:** [April 15, 2007, 3:23pm UTC](https://forum.kirupa.com/t/kirupa-gallery-customized-question/222624/1 "2007-04-15T15:23:01Z")

</div>

I have a site set up with a maintimeline and 5 external loading swfs for the sections.

In one of the swfs I have implemented the kirupa photo gallery:  
[http://www.kirupa.com/developer/mx/photogallery.htm](http://www.kirupa.com/developer/mx/photogallery.htm)

but with a slight modifier so that it advances on its own. When I test the movie it loads only the first picture and does not move forward from there.

Any help would be greatly appreciated.

```auto

// fill this array with your pics
this.pathToPics = "../images/Lounge/";
// fill this array with your pics
this.pArray = ["Pic1.jpg", "Pic2.jpg","Pic3.jpg","Pic4.jpg"];this.fadeSpeed = 50;
this.pIndex = 0;
var p = this.photo;
// MovieClip methods ----------------------------------
// d=direction; should 1 or -1 but can be any number
//loads an image automatically when you run animation
loadMovie (this.pathToPics + this.pArray[0], p);

MovieClip.prototype.changePhoto = function (d)
{
// make sure pIndex falls within pArray.length
this.pIndex = (this.pIndex + d) % this.pArray.length;
if (this.pIndex < 0)
{
this.pIndex += this.pArray.length;
}
this.onEnterFrame = fadeOut;
};
MovieClip.prototype.fadeOut = function ()
{
if (this.photo._alpha > this.fadeSpeed)
{
this.photo._alpha -= this.fadeSpeed;
}
else
{
this.loadPhoto ();
}
};
MovieClip.prototype.loadPhoto = function ()
{
// specify the movieclip to load images into
//------------------------------------------
p._alpha = 0;
p.loadMovie (this.pathToPics + this.pArray[this.pIndex]);
this.onEnterFrame = loadMeter;
};
MovieClip.prototype.loadMeter = function ()
{
var i, l, t;
l = this.photo.getBytesLoaded ();
t = this.photo.getBytesTotal ();
if (t > 0 && t == l)
{
this.onEnterFrame = fadeIn;
}
else
{
trace (l / t);
}
};
MovieClip.prototype.fadeIn = function ()
{
if (this.photo._alpha < 100 - this.fadeSpeed)
{
this.photo._alpha += this.fadeSpeed;
}
else
{
this.photo._alpha = 100;
this.onEnterFrame = null;
}
};
// Actions -----------------------------------------
this.onKeyDown = function ()
{
if (Key.getCode () == Key.LEFT)
{
this.changePhoto (-1);
}
else if (Key.getCode () == Key.RIGHT)
{
this.changePhoto (1);
}
};

Key.addListener (this);

function setTimer () {
	autoTimer = 2000;
	clearInterval (autoSlideInterval);
	autoSlideInterval = setInterval (autoSlide, autoTimer);
}
function autoSlide () {
	changePhoto (1);
	setTimer ();
}
autoSlide ();

```

:\*(
