Photo Gallery with external files

:thumb:

Hi

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

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:


 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:


 
 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

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)

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 ? :angel:

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

scotty(-:

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, 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)

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

Again, thanks!

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: