# Dynamic image scrolling gallery

**URL:** <https://forum.kirupa.com/t/dynamic-image-scrolling-gallery/110716>\
**Category:** Uncategorized\
**Created:** [May 19, 2004, 2:52am UTC](https://forum.kirupa.com/t/dynamic-image-scrolling-gallery/110716 "2004-05-19T02:52:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gazzer](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gazzer](https://forum.kirupa.com/u/gazzer)\
**Post date:** [May 19, 2004, 2:52am UTC](https://forum.kirupa.com/t/dynamic-image-scrolling-gallery/110716/1 "2004-05-19T02:52:03Z")

</div>

With the help of Scotty and several of the tutorials here in these forums I have a dynamic scroller. The only problem is that I cannot figure out how to have one of the images appear on stage as an initial placeholder. Currently it is blank. The following is the code:

this.pathToPics = “image1folder/”;  
this.pArray = [“image0.jpg”, “image1.jpg”, “image2.jpg”, “image3.jpg”, “image4.jpg”, “image5.jpg”];  
this.fadeSpeed = 20;  
MovieClip.prototype.changePhoto = function(d) {  
this.pIndex = d;  
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 = this.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;  
}  
};  
// code for the menu  
xcenter = 185;  
speed = 1/20;  
wijd = menu.\_width/2+19;  
menu.setMask(mask);  
menu.onEnterFrame = function() {  
if (mask.hitTest(this.\_root.\_xmouse, this.\_root.\_ymouse)) {  
var distance = this.\_parent.\_xmouse-xcenter;  
this.\_x += (distance\*speed);  
if (this.\_x\>0) {  
this.\_x = -wijd;  
}  
if (this.\_x\<-wijd) {  
this.\_x = 0;  
}  
}  
};

Any help or direction would be greatly appreciated. Scotty are you out there?

Gazzer
