# Photo gallery not working properly

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2004, 2:16pm UTC](https://forum.kirupa.com/t/photo-gallery-not-working-properly/111580/2 "2004-05-28T14:16:17Z")

</div>

Change the registrationpoint of you “photo” movieclip.  
At the moment it is in the center, it should be top-left. For the missing pictures, check if they’re non-progressive (Flash can’t load progressive jpg’s).

scotty(-:

and of course: Welcome to kirupa=)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2004, 2:48pm UTC](https://forum.kirupa.com/t/photo-gallery-not-working-properly/111580/3 "2004-05-28T14:48:04Z")

</div>

Thanks-for your help scotty,

What do you mean by progressive Jpgs and how do you check that there non-progressive.

Thanks again

Andy

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2004, 2:54pm UTC](https://forum.kirupa.com/t/photo-gallery-not-working-properly/111580/4 "2004-05-28T14:54:18Z")

</div>

(non)progressive is a format for saving images as jpg.  
In eg Photoshop, if you save an image as jpg, you choose which format you want;)

scotty(-:
