# Photo Gallery

**URL:** <https://forum.kirupa.com/t/photo-gallery/15603>\
**Category:** Uncategorized\
**Created:** [March 16, 2003, 4:17am UTC](https://forum.kirupa.com/t/photo-gallery/15603 "2003-03-16T04:17:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xzandar](https://avatars.discourse-cdn.com/v4/letter/x/f0a364/32.png) [@Xzandar](https://forum.kirupa.com/u/Xzandar)\
**Post date:** [March 16, 2003, 4:17am UTC](https://forum.kirupa.com/t/photo-gallery/15603/1 "2003-03-16T04:17:58Z")

</div>

I’ve been a webmaster since 1997, with programmed graphics, then going into Adobe Photoshop, HTML, and PHP. Then I decided I wanted to do more, so I went into Flash earlier this year. Little did I know what a mess it would turn into. I’m not real comfortable with asking for help, but you’ve got to get comfortable sometime.

I followed the tutorial on kirupa, but instead of getting the stated result, I got the first pic in the gallery array, flashing repeatedly. Can someone help me, please?

Christopher William Coddington (Xzandar / cwcandromeda)

---

<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:** [March 16, 2003, 4:21am UTC](https://forum.kirupa.com/t/photo-gallery/15603/2 "2003-03-16T04:21:59Z")

</div>

the [http://www.kirupa.com/developer/mx/photogallery.htm](http://www.kirupa.com/developer/mx/photogallery.htm) tutorial? Is there anyway to post code?

:love:

---

<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:** [March 16, 2003, 4:28am UTC](https://forum.kirupa.com/t/photo-gallery/15603/3 "2003-03-16T04:28:27Z")

</div>

yup.

Here’s what was in my action frame:

**Action.**  
//Code written by sbeener (suprabeener)  
/\*  
i wrote this code, but you can use and abuse it however you like.  
the methods are defined in the order which they occur to make it  
easier to understand.  
\*/  
// 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 = “…/images/gallery/”;  
// fill this array with your pics  
this.pArray = [“front\_gallery\_1.jpg”];  
this.fadeSpeed = 5;  
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);

“Next” button action:

**Next.**  
on (release) {  
\_root.changePhoto(-1);  
}

“Back” button action:

**Back.**  
on (release) {  
\_root.changePhoto(1);  
}

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

I’m 14. I didn’t think these migraines were possible for individuals of my age.

Christopher William Coddington (Xzandar / cwcandromeda)

---

<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:** [March 16, 2003, 5:35am UTC](https://forum.kirupa.com/t/photo-gallery/15603/4 "2003-03-16T05:35:13Z")

</div>

i dont remember off the top of my head but…is that SUPPOSE to be a -1???

```php

Next.
on (release) {
_root.changePhoto(-1);
}

```

---

<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:** [March 16, 2003, 5:43am UTC](https://forum.kirupa.com/t/photo-gallery/15603/5 "2003-03-16T05:43:04Z")

</div>

The tutorial said it was. _shrugs_ I still can’t figure out why only one picture is flashing. It doesn’t even go to the next when I hit the buttons. The first one just flashes repeatedly.

Christopher William Coddington (Xzandar / cwcandromeda)

---

<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:** [March 16, 2003, 6:05am UTC](https://forum.kirupa.com/t/photo-gallery/15603/6 "2003-03-16T06:05:09Z")

</div>

I’ve never used this code before…but the next thing i see is that you’ve only chosen 1 picture while in the tutorial it gives the code below that specify’s many pics. Where’d you put the rest of the pics to be scrolled?

```php
// fill this array with your pics
this.pArray = ["image0.jpg", "image1.jpg", "image2.jpg", "image3.jpg", "image4.jpg", "image5.jpg", "image6.jpg", "image7.jpg", "image8.jpg", "image9.jpg"];

```

---

<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:** [March 16, 2003, 7:14am UTC](https://forum.kirupa.com/t/photo-gallery/15603/7 "2003-03-16T07:14:59Z")

</div>

My code has 7 more images to it, and it still does the same thing.

Christopher William Coddington (Xzandar / cwcandromeda)

---

<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:** [March 16, 2003, 7:25am UTC](https://forum.kirupa.com/t/photo-gallery/15603/8 "2003-03-16T07:25:07Z")

</div>

1. The error might be with your images. Flash can only load in Non-Progressively saved .jpg images. No other file types are allow, and they MUST be non-progressive. That might be your problem.

2. Your footer is too big. We are trying to limit that due to lag on the forum and such, please read this…

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=16926](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=16926)

---

<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:** [March 16, 2003, 7:32am UTC](https://forum.kirupa.com/t/photo-gallery/15603/9 "2003-03-16T07:32:21Z")

</div>

this may sound silly but it’s all i can come up with, without seeing your file at least…are you sure you have the img keyframes all set to the same length. I added a frame to the end of the actions layer and got some flashing…all layers have ONE frame right?  
If that doesn’t solve your prob I would recommend downloading the tutorial and just start by taking that file and changing the graphics to yours. Then if that works…keep adjusting the file until it’s how you want it. At least then you’ve started with a working copy and you can see where you go wrong if you do it again.

:love:

---

<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:** [March 16, 2003, 7:38am UTC](https://forum.kirupa.com/t/photo-gallery/15603/10 "2003-03-16T07:38:15Z")

</div>

> \*Originally posted by lostinbeta \*  
> \*\*1) The error might be with your images. Flash can only load in Non-Progressively saved .jpg images. No other file types are allow, and they MUST be non-progressive. That might be your problem.

1. Your footer is too big. We are trying to limit that due to lag on the forum and such, please read this…

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=16926](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=16926) \*\*

huh? You’re talking about my sig right? :-\

As for using the file in the tutorial. I don’t want to do that, because I want to master Flash, and I want to do it myself.

Christopher William Coddington (Xzandar / cwcandromeda)

---

<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:** [March 16, 2003, 7:39am UTC](https://forum.kirupa.com/t/photo-gallery/15603/11 "2003-03-16T07:39:54Z")

</div>

Yes, I was referring to your sig 🙂

And by comparing your file with the file at the end of the download you can check to see if any of your coding or anything is wrong, and if not, then the problem probably has to do with your images (as stated previously :))

---

<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:** [March 16, 2003, 7:45am UTC](https://forum.kirupa.com/t/photo-gallery/15603/12 "2003-03-16T07:45:41Z")

</div>

The images are standard .jpg files, so I don’t understand what the problem is.

There is only one frame, but one layer seems to be sticking out farther on the frame timeline, so I better figure out how to relieve that.

Geesh! I thought the 500 x 200 sig limit on my clan board was bad. It’ll take a magnifying glass and more time and patience to be able to make a 300 x 60 image.

Christopher William Coddington (Xzandar / cwcandromeda)

---

<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:** [March 16, 2003, 7:48am UTC](https://forum.kirupa.com/t/photo-gallery/15603/13 "2003-03-16T07:48:57Z")

</div>

To cut back the frames you can right click on the frames you want to get rid of and choose “Remove Frame”.

And 300x60 isn’t THAT bad. We get by with it 🙂 Just presses your creativity one step further 😉

---

<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:** [March 16, 2003, 7:49am UTC](https://forum.kirupa.com/t/photo-gallery/15603/14 "2003-03-16T07:49:17Z")

</div>

right-click on the far right frame (the one sticking out) and choose ‘remove frames’ it should work fine now.

:love:

---

<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:** [March 16, 2003, 7:50am UTC](https://forum.kirupa.com/t/photo-gallery/15603/15 "2003-03-16T07:50:08Z")

</div>

lib – do you always just squeak in there?? LOL. 1 min apart

---

<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:** [March 16, 2003, 7:50am UTC](https://forum.kirupa.com/t/photo-gallery/15603/16 "2003-03-16T07:50:40Z")

</div>

LOL, sorry about that. You may have beaten had this new Quick Reply window not been here at the bottom 🙂 I love this thing.

---

<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:** [March 16, 2003, 8:02am UTC](https://forum.kirupa.com/t/photo-gallery/15603/17 "2003-03-16T08:02:38Z")

</div>

_does a dance_ woosh. It works. 🙂

Thanks guys! 😃

Christopher William Coddington (Xzandar / cwcandromeda)

---

<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:** [March 16, 2003, 8:06am UTC](https://forum.kirupa.com/t/photo-gallery/15603/18 "2003-03-16T08:06:07Z")

</div>

Congrats man =)

---

<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:** [March 16, 2003, 8:10am UTC](https://forum.kirupa.com/t/photo-gallery/15603/19 "2003-03-16T08:10:16Z")

</div>

And I didn’t use the file from the tutorial, which makes me happy. 🙂 Although, I find it’s harder that way, but that’s how I learned to do everything I can do now, which I started learning back in 1997.

Christopher William Coddington (Xzandar / cwcandromeda)

---

<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:** [March 16, 2003, 1:35pm UTC](https://forum.kirupa.com/t/photo-gallery/15603/20 "2003-03-16T13:35:59Z")

</div>

excuse me, i am starting to create a photo gallery and i want to ask someone isn’t after i have finish the photo gallery which was taught in kirupa ,do i have to upload the folder of image to the web too

[Next page](https://forum.kirupa.com/t/photo-gallery/15603.md?page=2)
