# Gallery Issue

**URL:** <https://forum.kirupa.com/t/gallery-issue/189299>\
**Category:** flash\
**Created:** [June 1, 2006, 3:03pm UTC](https://forum.kirupa.com/t/gallery-issue/189299 "2006-06-01T15:03:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bonzy](https://avatars.discourse-cdn.com/v4/letter/b/8e7dd6/32.png) [@bonzy](https://forum.kirupa.com/u/bonzy)\
**Post date:** [June 1, 2006, 3:03pm UTC](https://forum.kirupa.com/t/gallery-issue/189299/1 "2006-06-01T15:03:46Z")

</div>

Greetings,

Based on the Kirupa tutorial, as well as actionscript tweaking from a forum member, I successfully made a gallery that calls in jpgs from the host.

The Kirupa tutorial [http://www.kirupa.com/developer/mx/photogallery.htm](http://www.kirupa.com/developer/mx/photogallery.htm) uses arrows to navigate the images. The actionscript tweak I used, thanks to a forum member, allows the use of thumbnails instead of the arrows.

What I need is to use thumbnails AND arrows to navigate… here is the actionscript:

```auto
 var pathToPics = images/";
pArray = new Array();
pArray = ["00.jpg", "01.jpg", "02.jpg", "03.jpg", "04.jpg", "05.jpg", "06.jpg", "07.jpg", "08.jpg", "09.jpg", "10.jpg", "11.jpg", "12.jpg"];
var fadeSpeed = 30;
var pIndex = 0;
loadMovie(this.pathToPics+this.pArray[0], _root.photo);
MovieClip.prototype.changePhoto = function(d) {
    this.onEnterFrame = fadeOut;
};
MovieClip.prototype.fadeOut = function() {
    if (photo._alpha>this.fadeSpeed) {
        photo._alpha -= this.fadeSpeed;
    } else {
        this.loadPhoto();
    }
};
MovieClip.prototype.loadPhoto = function() {
    var p = photo;
    p._alpha = 0;
    p.loadMovie(pathToPics+pArray[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;
    }
};
for (var i = 0; i<pArray.length; i++) {
    var btn = this["b"+i];
    btn.id = i;
    btn.onRelease = function() {
        pIndex = this.id;
        changePhoto();
    };
}

```

Any help would be appreciated…thanks!
