I get a lot of requests from people about how to create a cool looking XML-driven photo gallery. The example below is a simple one that I built and it would be a good starting point for people looking to do the same thing. It pulls some images locally and some from Flickr. Check it out by clicking on the image below and you can get all of the source here.
Enjoy!
Lee









Thank you, very nice
Hiya,
too bad i am the first as i am not a power webmaster, just learning and need to know where to go to to find a group for my Dreamweaver photo gallery where i can ask a question…which is, in case you can direct me or answer yourself, how do i put code somewhere on each picture (perhaps the pages instead of the thumbnails)so people will stop saving and printing the copyrighted computer created cards?
thanks so much for whatever help you can give to this humble site.
jeannekassof@sbcglobal.net
Great job on this! Very efficient. I particularly like the way you handled the description. Simple, yet effective.
awww… those descriptions sound so cool. I wish i could have gone to that..
I guess theres always next time… Speaking of which, when is the next Flash Forward.
I dont see this as an effective way for displaying images. The user has no control over wat he/she wants to see. Instead we have to wait for each new pic to fade in.
A CSS-xhtml is a better alternative to this in my opinion.. eppecially because it can reach a wider audience (cough cough at flash’s accesibility problems).
cssplay.co.uk has really good examples of css image galleries.
Lee,
Is the fla an 8 file? I can’t get MX 04 to open it. I would love to see it open up.
The xml is cool. And your as file has me humbled a bit.
Thanks for your contributions to the Flash community.
Very cool lee as always! I love the title effect.
Niccccce!!!
CCCCcccsssweeeeet!
Seriously Lee. You gotta get a wife or something!
Not.
great xml stuff!
thank you a lot: perfect for study !
That’s a good one Lee, thnx
Hi,
the link is broken… i can’t see the sources
thanks for all your works
This is exactly what I’m looking for… except I can’t open the .fla. It crashes my Flash every time.
Is this a flash 8 file?? When I export it comes up with the following error:
**Error** C:\Documents and Settings\fcorrote\Desktop\Photo Gallery\gallery.as: Line 49: The class or interface ‘Fuse’ could not be loaded.
var f:Fuse = new Fuse();
Total ActionScript Errors: 1 Reported Errors: 1
Ok ignore that last one, I’ve solved it
Is there a way to get multi-line text??
hi freddy,
how did you solve the Fuse thing..??
help would be appreciated
bytewiz9
To resolve the fuse issue go here
http://www.mosessupposes.com/Fuse/
download the files and drop the com folder into your classes directory within the Flash configuration directory.
I was playing around with this awesome photo display! Great job! Quick question. I changed the dimensions of the movie and moved things around a little and now, some text shows correctly, while others don’t show at all or just a little. Am I missing something?
help! i get that “fuse” error, downloaded the files from http://www.mosessupposes.com/Fuse/ but there is no classes directory in my flash configuration directory. i tried creating one and putting the com folder in it but that does’nt work.
This is great. One thing. How do you make the image link to somewhere? I’ve created a node then xml call “theLink” but I just don’t know how to make it work when the image is clicked. Thanks.
I’d also like to know how to make the images clickable so they take you to a link. Is this something you already added or is this something we have to add ourselves? Thanks
Thank u Lee, you are the best !
Nice, very nice..
hey, thats nice, but give the original .fla file…
I dropped the “com” folder of the download into the “classes” folder as directed but still get message :
**Error** C:\Documents and Settings\fcorrote\Desktop\Photo Gallery\gallery.as: Line 49: The class or interface ‘Fuse’ could not be loaded.
var f:Fuse = new Fuse();
In any case, I’m not sure this script is the answer to my problems (need a thumbnail gallery that scales larger, etc. and room for links) but hoping!
any help would be appreciated!
thanks Mark.
Your tips is working. Now I am trying to apply two text in this flash.
its all working.
demiloca
It’s easier to forgo the whole classes route and simply install the Fuse MXP (same thing only easier). Go here:http://www.mosessupposes.com/Fuse/ scroll about halfway down and click Download Fuse 2.1.3r1. Unzip, double-click FuseKit2.1.mxp and finish installation.
Enjoy Fuse and donate if you can.
This is great thanks mate – big ups too ska_kid too, that helped me a lot.
i’ve edited the script so that the description box is a clickable link. i.e.
add the following to the array line
var link:Array = new Array();
and edit the following
var nodes:Array = this.firstChild.childNodes;
for(var i=0;i
was too long for one post. here is the rest
_root.caps.push(nodes[i].attributes.desc);
_root.photos.push(nodes[i].attributes.url);
_root.link.push(nodes[i].attributes.link);
textBar.onRelease = function() {
getURL(link[current], “_blank”);
trace(link[current]);
hi , everybody i need your help .
how can i make all the frame as clickable link.
also i try to put this code but i didn’t unserstand in which line number in the code i should put it.
var link:Array = new Array();
and edit the following
var nodes:Array = this.firstChild.childNodes;
for(var i=0;i
_root.caps.push(nodes[i].attributes.desc);
_root.photos.push(nodes[i].attributes.url);
_root.link.push(nodes[i].attributes.link);
textBar.onRelease = function() {
getURL(link[current], “_blankâ€);
trace(link[current]);
many thanks for the help,
moti
very nice, maybe looks better with a fade effect o slide, thanks.
to make the whole frame clickable don’t use the textBar, but the gallery:
this.gallery.bmdc.onRelease = function() {
getURL(“url?id=”+ids[current], “_blank”);
}
also need to add to the onLoad and change this to _root ?
thanks for the awesome code Lee!
I thank you so much!!!! great job!
Thank you for providing the source code
Kind regards
Hi there, I’m not sure if this is possible but I’ve been trying to do is a second tranny that moves the textBar right to left.
so..
First tranny is normal left => right
then on the second image in moves from right => left
Hope this makes sense.
just nice!!! you are my saviour!! thanx lee…
You have been my source for the past 2 years… I admire you, sharing your knowledge to us, the world…
rock on!
Thnkxx lee ! Though u have provided source file bt since i m quite new to this …so need help der too…i have seen the .as file, the fla also bt my swf is not wokring. Can ny1 tell propbly where is the prob?
Thnkx.. kIndly reply soon
Thank you for being so generous, your expertise is highly respected.Thank you.
Marco
can I use this script for Flash MX? thnx……
please send to my email adi_K2008@yahoo.com
thnx
my regard,
adi
Hi, i was so amaze to this code and thankful to the author for sharing your knowledge to us!
Please help..
How can I load a .swf file and randomize the loading of the movie?..
plz..help me. Thank you in advance..
buste
this is a really easy to use set.
i am having a time trying to make the image clickable links.
if someone could simply spell it out in plain english that would help so much..
i have tried every variation on this list and nothing works..
also i want to do away with the description box as well. i simply moved it for now but would like to just eliminate it completely..
Hi keeb!
Try this..i put the code and place to..
function preload():Void
{
if(current == photos.length-1) var num = 0;
else var num = current+1;
this.gallery.bmdc.preload.loadMovie(photos[num]);
//– And heres the code..
this.gallery.bmdc.onRelease = function() {
getURL(link[current], “_blank”);
}
}
Open the .fla file and publish it again to make a .swf file..
base on my opinion it will compile again including the .as file,
(that was base on my own opinion..)
about the description box, Iam also trying to fix it until now..
Hope it will helps you a little..
sorry for the wrong grammar..
Gobless..
i have made a simple gallery with flash with real time xml generation.
have a look at http://leeoh.com/test/localGallery.swf
it aim at users with limited scripting knowledge.
one can use the simple backend at http://leeoh.com/test/photo/
to upload photos. new photos show first.
at testing phase, files uploaded are limited up to 30kb. i need your comments.
the source files will release to public once debug is done. enjoy =)
how do you put a xml driven gallery in flash website
we can do with zigoengine flash gallery ,,, i created buttons and i m loading images by that buttons….but doTween is not working with zigoengine ……..so any help i want………
thank you
I’ve just started using this gallery and it’s great. I’ve been able to modify the size of the movie, move the text bar to where I want it and have not have many problems along the way.
The only weird thing that I’ve notice is if I place the movie in a html file, I need to save the html file in the same folder in order for the pictures to show correctly. Anyone else have this problem? If I save the html in a different folder, The movie will come up, but will not show any of the pictures (just displays loading message).
Thanks!!
In reference to comment # 48
I’ve tried using both relating and absolute links… In .as file so it can find the xml file and also in the xml file so it can find the photos.
can anyone post the an updated version with clickable links.
A pack that contains the AS,swf,xml AND IMAGES.
Please, this would be the definitive colmination of these posts and help me out BIG TIME.
Flash Forever!!