# Problem with photo gallery tutorial

**URL:** <https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132>\
**Category:** Uncategorized\
**Created:** [August 22, 2003, 6:18pm UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132 "2003-08-22T18:18:21Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![ernieball](https://avatars.discourse-cdn.com/v4/letter/e/ac91a4/32.png) [@ernieball](https://forum.kirupa.com/u/ernieball)\
**Post date:** [August 22, 2003, 6:18pm UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/1 "2003-08-22T18:18:21Z")

</div>

Hey i tried the photogallery tutorial and when i published it there was no picture in the frame ☹ heres the actionscript, did i make any errors?  
[AS]// variables ------------------------------------------  
// put the path to your pics here, include the slashes (ie. “pics/”)  
// leave it blank if they’re in the same directory  
this.pathToPics = “[http://www.thozeguys.com/pics/](http://www.thozeguys.com/pics/)”;  
// fill this array with your pics  
this.pArray = [“DSCF0019.JPG”, “DSCF0022.JPG”, “DSCF0027.JPG”, “DSCF0028.JPG”, “DSCF0029.JPG”, “DSCF0031.JPG”, “DSCF0033.JPG”, “DSCF0035.JPG”, “DSCF0038.JPG”, “DSCF0049.JPG”, “DSCF0042.JPG”, “DSCF0052.JPG”, “DSCF0053.JPG”, “DSCF0055.JPG”, “DSCF0057.JPG”, “DSCF0062.JPG”, “DSCF0068.JPG”, “DSCF0070.JPG”, “DSCF0071.JPG”];  
this.fadeSpeed = 20;  
this.pIndex = 0;  
// 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], \_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() {  
// specify the movieclip to load images into  
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;  
}  
};  
// Actions -----------------------------------------  
// these aren’t necessary, just an example implementation  
this.onKeyDown = function() {  
if (Key.getCode() == Key.LEFT) {  
this.changePhoto(-1);  
} else if (Key.getCode() == Key.RIGHT) {  
this.changePhoto(1);  
}  
};  
Key.addListener(this);[/AS]

---

<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:** [August 22, 2003, 6:35pm UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/2 "2003-08-22T18:35:49Z")

</div>

Hey ernie, welcome to kirupa forum. =)

The first thing I can think of is, make sure that your images are non-progressive JPEG’s. :-  
[http://www.macromedia.com/support/flash/ts/documents/cant\_load\_jpg.htm](http://www.macromedia.com/support/flash/ts/documents/cant_load_jpg.htm)

And next time, please use [**AS][**/AS] tags to show your code. Thank you. 🙂

---

<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:** [August 22, 2003, 6:51pm UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/3 "2003-08-22T18:51:05Z")

</div>

ahh thanks, whats a good editing program to make them non-progressive?

---

<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:** [August 22, 2003, 6:53pm UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/4 "2003-08-22T18:53:37Z")

</div>

I’d use Photoshop or Fireworks, any program should do though. 😛

---

<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:** [August 22, 2003, 6:54pm UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/5 "2003-08-22T18:54:12Z")

</div>

thanks!

---

<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:** [August 22, 2003, 6:58pm UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/6 "2003-08-22T18:58:11Z")

</div>

No problem. =)

---

<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:** [August 22, 2003, 7:05pm UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/7 "2003-08-22T19:05:10Z")

</div>

I just tried saving as… for one of the pictures in photoshop and theres no progressive option ☹ you have any idea where it would say something about it?

---

<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:** [August 22, 2003, 7:07pm UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/8 "2003-08-22T19:07:51Z")

</div>

If you are using photoshop6, click File | Save for Web  
then uncheck the “Progressive” option and hit ok.

---

<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:** [August 22, 2003, 7:08pm UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/9 "2003-08-22T19:08:46Z")

</div>

heres one of the pictures.

---

<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:** [August 22, 2003, 7:14pm UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/10 "2003-08-22T19:14:58Z")

</div>

i finally found the option!! yay!

---

<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:** [August 22, 2003, 7:53pm UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/11 "2003-08-22T19:53:39Z")

</div>

sad news… It still wont work i put it on the internet so yuo can see for yourself  
[http://www.thozeguys.com/APG.html](http://www.thozeguys.com/APG.html)

---

<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:** [August 22, 2003, 7:55pm UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/12 "2003-08-22T19:55:55Z")

</div>

Can we see the FLA ?

---

<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:** [August 22, 2003, 7:58pm UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/13 "2003-08-22T19:58:06Z")

</div>

here it is

---

<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:** [August 22, 2003, 8:34pm UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/14 "2003-08-22T20:34:25Z")

</div>

what do ya think?

---

<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:** [August 22, 2003, 9:08pm UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/15 "2003-08-22T21:08:51Z")

</div>

here i changed the code try this new .fla file

---

<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:** [August 23, 2003, 1:20am UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/16 "2003-08-23T01:20:24Z")

</div>

My idiotic self would use gotoandStop for photo gallerys! :sigh:

---

<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:** [August 23, 2003, 1:28am UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/17 "2003-08-23T01:28:38Z")

</div>

Yes, thats what I did with my gallery on my site, but it quickly got really big sucking up lots of bandwidth, so I am trying to make a dyanmic gallery too.

---

<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:** [August 23, 2003, 3:37am UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/18 "2003-08-23T03:37:51Z")

</div>

how do you do that?

---

<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:** [August 23, 2003, 3:09pm UTC](https://forum.kirupa.com/t/problem-with-photo-gallery-tutorial/29132/19 "2003-08-23T15:09:34Z")

</div>

Just take the pics, put em on seperate keyframes, add buttons…and ur done.
