# Need help with foto gallery

**URL:** <https://forum.kirupa.com/t/need-help-with-foto-gallery/359>\
**Category:** flash\
**Created:** [July 15, 2002, 11:30am UTC](https://forum.kirupa.com/t/need-help-with-foto-gallery/359 "2002-07-15T11:30:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Charley](https://avatars.discourse-cdn.com/v4/letter/c/97f17d/32.png) [@Charley](https://forum.kirupa.com/u/Charley)\
**Post date:** [July 15, 2002, 11:30am UTC](https://forum.kirupa.com/t/need-help-with-foto-gallery/359/1 "2002-07-15T11:30:15Z")

</div>

Hey,

ive readed the turtorial and ive done what their was standing, but i get this message

> Error opening URL “file:///C|/DOCUME%7E1/Charley/LOCALS%7E1/Temp/287\_20.jpg,LHFapriliaGP2002.jpg,Mercedes.jpg,f247.jpg,kopf.gif,sof2-005.jpg,p1.gif,e9c5.gif,diablo%202.gif,dragon.gif287\_20.jpg”

if i do test movie,

in my action script their is standing this

* * *

//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 =  
// fill this array with your  
this.pArray = [“287\_20.jpg”, “LHFapriliaGP2002.jpg”, “Mercedes.jpg”, “f247.jpg”, “kopf.gif”, “sof2-005.jpg”, “p1.gif”, “e9c5.gif”, “diablo%202.gif”, “dragon.gif”];  
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);

* * *

I think it’s the target were my pictures ar stored…  
And i diden’t past all the pictures in the flash file …

Thx if you can help me, grtz charley

---

<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:** [July 15, 2002, 2:00pm UTC](https://forum.kirupa.com/t/need-help-with-foto-gallery/359/2 "2002-07-15T14:00:47Z")

</div>

i havent yet dun that tutorial but iwould imagine u have to import all the pics to the movie just do it exactly as the tute says and u sould be ok if your a newbie to flash then just do it as it is then try ediing it to you own style

---

<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:** [July 15, 2002, 2:08pm UTC](https://forum.kirupa.com/t/need-help-with-foto-gallery/359/3 "2002-07-15T14:08:25Z")

</div>

```auto
// 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 = "";

```

When he says leave it blank, Supra doesn’t mean that you just put nothing. You have got to declare it as an empty string, that is to say “”. Hence the code I wrote. In your code, the problem is that this.pathToPics = pArray, so everything is, well, not working.

pom :asian:

---

<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:** [July 15, 2002, 2:32pm UTC](https://forum.kirupa.com/t/need-help-with-foto-gallery/359/4 "2002-07-15T14:32:27Z")

</div>

what must i put their then??

---

<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:** [July 15, 2002, 3:59pm UTC](https://forum.kirupa.com/t/need-help-with-foto-gallery/359/5 "2002-07-15T15:59:13Z")

</div>

Well, what I put in my post : an empty string “”.

pom :asian:
