# Photo gallery not working properly

**URL:** <https://forum.kirupa.com/t/photo-gallery-not-working-properly/52890>\
**Category:** Uncategorized\
**Created:** [May 28, 2004, 1:52pm UTC](https://forum.kirupa.com/t/photo-gallery-not-working-properly/52890 "2004-05-28T13:52:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy11983](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@andy11983](https://forum.kirupa.com/u/andy11983)\
**Post date:** [May 28, 2004, 1:52pm UTC](https://forum.kirupa.com/t/photo-gallery-not-working-properly/52890/1 "2004-05-28T13:52:47Z")

</div>

Hi,

Im new to flash , anyway ive been doing the tutorial ‘create a photo gallery’ anyway i cant seem to get the images to line up correctly - there always displayed down to the bottom right of the scrren and also only 1 of my pictures is displayed, im missing 2 others. 1 of the mercedes-benz and 1 of the mitsubishi evolution.

this is the action scripting

```auto
  
 

this.pathToPics = "photogall/";
this.pArray = ["merc.jpg", "model.jpg", "evo.gif"];
this.fadeSpeed = 20;
this.pIndex = 0;
loadMovie(this.pathToPics+this.pArray[0], _root.photo);
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() {
 
 var p = _root.photo;
 
 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;
 }
};

```

Ive done what it says in the tutorial and have this problem, so i was hoping somebody will know how to sort it.

Thanks for your help

Andy
