# Photo Gallery with external files

**URL:** <https://forum.kirupa.com/t/photo-gallery-with-external-files/58078>\
**Category:** flash\
**Created:** [July 19, 2004, 4:50pm UTC](https://forum.kirupa.com/t/photo-gallery-with-external-files/58078 "2004-07-19T16:50:48Z")\
**Posts on this page:** 7\
**Page:** 2

<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 23, 2004, 6:54am UTC](https://forum.kirupa.com/t/photo-gallery-with-external-files/58078/21 "2004-07-23T06:54:50Z")

</div>

:thumb:

---

<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 11, 2004, 12:45pm UTC](https://forum.kirupa.com/t/photo-gallery-with-external-files/58078/22 "2004-08-11T12:45:15Z")

</div>

Hi

I’m also trying to do something similar but having some trouble, hopefully you’ll be able to help me out 🙂

I basically have two movie clips at the moment: thumbnailscrollcontainer and thumbnailholder, the latter is contained in the former.

The code is all in the thumbnailscrollcontainer movie timeline.

The first frame is:

```php

 thumbfilename = new Array();	//declare array which holds thumbnail filenames
 
 thumbfilelist = new LoadVars();
 thumbfilelist.load("photogallery.php");
 
 thumbfilelist.onLoad = function(success)
 {
 	if (success)
 	{
 		thumbfilename = thumbfilelist.thumbs.split(",");
 	}
 }
 

```

Then on the next frame it’s:

```php

 
 var numfiles = thumbfilename.length; //gets length of array so we know how many times to loop
 var mcname;
 var thumbnumber;
 
 test = numfiles;
 
 for(i=0; i<=numfiles;i++)
 {
 	thumbnumber = i + 1; //Number of thumbnail being processed
 	
 	mcname = "thumbnail" + thumbnumber;
 	duplicateMovieClip("thumbnail",mcname,eval(thumbnumber));
 	mcname.loadMovie("thumbnails/" + thumbfilename*);
 	mcname._x = mcname._x + 20;
 }
 stop();
 
 

```

Basically I need the thumbnails dynamically loaded from a thumbnails folder.

The php script outputs:

thumbs=thumbnail1.jpg,Thumbnail2.jpg,Thumbnail3.jpg,Thumbnail4.jpg,Thumbnail5.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:** [September 20, 2004, 6:20am UTC](https://forum.kirupa.com/t/photo-gallery-with-external-files/58078/23 "2004-09-20T06:20:27Z")

</div>

Good Morning,

This is in reference to the original tutorial.

I got it to work!! But only by itself, when I try to take that movie and load it externally into another, it doesn’t load the pictures.

Any ideas?

Thanks.

(Newbie)

---

<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:** [September 20, 2004, 7:02am UTC](https://forum.kirupa.com/t/photo-gallery-with-external-files/58078/24 "2004-09-20T07:02:42Z")

</div>

Speaking of image gallery, why don’t you go DYNAMIC? If you load your data from a \*\*text \*\* file, you can as easy as that load it from a \*\*php \*\* file that browses dir.  
Have you tried this:  
[http://www.kirupaforum.com/forums/showpost.php?p=630106&postcount=10](http://www.kirupaforum.com/forums/showpost.php?p=630106&postcount=10) ? 👼

---

<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:** [September 20, 2004, 7:58am UTC](https://forum.kirupa.com/t/photo-gallery-with-external-files/58078/25 "2004-09-20T07:58:35Z")

</div>

> [@jasarius](#):
>
> Good Morning,
> 
> This is in reference to the original tutorial.
> 
> I got it to work!! But only by itself, when I try to take that movie and load it externally into another, it doesn’t load the pictures.
> 
> Any ideas?
> 
> Thanks.
> 
> (Newbie)

You’ve probably used \_root somewhere in the movie you want to load?

scotty(-:

---

<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:** [September 20, 2004, 7:53pm UTC](https://forum.kirupa.com/t/photo-gallery-with-external-files/58078/26 "2004-09-20T19:53:29Z")

</div>

> [@Danko](#):
>
> Speaking of image gallery, why don’t you go DYNAMIC? If you load your data from a \*\*text \*\* file, you can as easy as that load it from a \*\*php \*\* file that browses dir.  
> Have you tried this:  
> [http://www.kirupaforum.com/forums/showpost.php?p=630106&postcount=10](http://www.kirupaforum.com/forums/showpost.php?p=630106&postcount=10) ? 👼

Thanks for the link, I’ll give it a shot. The main reason is because I’m dynamically challenged. I’m fairly new (self-taught) to Flash and web design in general.

PHP, XML, ASP, [ASP.NET](http://ASP.NET), QRS, TUV it’s all Greek to me! :cap:

I’m just now getting familiar with CSS it that tells you anything.

I just finished my first site [(see forum post here)](http://www.kirupaforum.com/forums/showthread.php?t=70459)

I’ll give it a shot and tell ya what I come up with.

Again, 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:** [September 20, 2004, 7:57pm UTC](https://forum.kirupa.com/t/photo-gallery-with-external-files/58078/27 "2004-09-20T19:57:50Z")

</div>

> [@scotty](#):
>
> You’ve probably used \_root somewhere in the movie you want to load?
> 
> scotty(-:

Thanks…you were right (of course). It shows up now, but only one picture, when I hit the “next” button nothing else shows up.

I’ll work on the buttons a bit longer to see if I can’t figure it out.

If I get stuck, I know where to come.

Kirupa rocks!! :party:

[Previous page](https://forum.kirupa.com/t/photo-gallery-with-external-files/58078.md?page=1)
