Simple ActionScript 2 XML Gallery
Sample Flash file for a very basic bare bones XML gallery with a scrolling thumbnails track, and simple load progress handling. This example is really meant as a basis to build something more elegant and interesting on. In that sense, it provides a skeleton for a site, and it is up to you, as a user of the file to skin it.
This file started life as a comparison to an ActionScript 3 implementation of the same idea. The ActionScript 3 version is more elegant and is slightly more flexible.
Gallery Features;
- Horizontal or Vertical Scrolling Thumbs track
- External XML Images
- Load Progress Handling
- Ability to load in different XML files
The source file contains two files, one file has a horizontal image scrolling track, while the other has a vertical images scrolling track.
View Example
Example can be viewed here;?Ǭ† http://www.noponies.com/dev/as2_simple_gallery/ (Note, no progress loading implemented)
Source Files
Here are the source files; ActionScript 2 Simple Gallery Files
Dependencies
File uses TweenLite, for image fading in and out.
Flash 8 or Flash CS3

March 11th, 2008 at 6:47 am
very nice base. thanks
June 4th, 2008 at 4:24 pm
nice and tidy
i was trying to build something similar but with two independant scrollers in one flash file… is it possible or eaasy enough? in my attempts i have just made a complete mess
September 15th, 2008 at 6:30 pm
Hi Dale,
great and well documented script, thanks.
One thing I have not been able to change was the size of the scroller mask with it staying at (Variable _level0.maskWidth = 634) even though I set it to 600. I was able to get around it by placing another mask over the top but I would love to know how to fix this in the code.
cheers mate
Andrew
September 17th, 2008 at 10:01 pm
Hello,
I was wondering if its possible to define a kind of grid layout for the thumbnails? I like the vertical layout and scrolling of thumbnails, but would like them laid out in rows and columns of 3×3 (then adding scrollable rows as thumbnails are added).
Is this an easy adjustment to make?
Thanks for any help,
Jane
September 18th, 2008 at 11:25 am
Jane,
You certainly could do that, but its not built into the file.
November 4th, 2008 at 1:22 am
i recently used this, and it looks fantastic, however one issue that comes up is if you have your mouse in the area where an image is about to load, it will show up empty. i’m trying to figure out how to remedy this, however if you have any suggestions they would be welcome. thanks for all your hard work.
November 4th, 2008 at 5:29 am
Jessica,
That will be due to tweenLite overwriting the tween. You can update the version of tweenLite used to a later version and enable the overwrite manager, which will stop that issue.
November 11th, 2008 at 2:26 am
Hi,
Your script has helped me out greatly on a project I’m working on. Thanks…
I’m having a weird problem that I can’t figure out though. I load one xml file full of about 24 images into the scroller. Then I have other buttons that load different XML. But, if you do any scrolling prior to clicking the buttons ,and there are less images in the new XML, the thumbs appear all stretched out. It’s like they are trying to fill up the space that I had scrolled to on the previous set of thumbs. I add the removeAllThumbs(); function to the button. That does remove the previous thumbs, but do I have to do something else to reset the size of the scroller or something??? Hope that makes sense. Thanks again.
November 22nd, 2008 at 12:10 am
dale only replies if you put a girls name robert… try roberta,
it worked for me
November 22nd, 2008 at 10:44 pm
Robert,
Try adding in a method to reset the scrollers width into that removeAllThumbs method. I don’t have time to add it myself sorry.
November 26th, 2008 at 12:21 am
Hi,
This is exactly what i was looking for
I was wondering if I could you help me put a comments text field in.
I noticed its there in the xml and have tryed loads of ways of making it work with no sucess.
thanks
gem
December 11th, 2008 at 9:11 am
thanks very much, this was a great help
January 12th, 2009 at 12:08 am
Hi,
Thanks. this is a great help. I’m just trying to figure out how to add captions to the images. If you could point me in the right direction, I would appreciate it!
Thanks!
May 20th, 2009 at 11:55 pm
hi there
I tried out your load Thumbs function. It worked a lot better than the one I wrote myself, which is awesome. However, the removethumbs function doesn’t work really well with the load thumbs code. Once it removes it, loadthumbs doesnt work anymore….
any suggestions?
June 9th, 2009 at 4:09 pm
Hi,
The gallery is incredible but i would like to add caption to every picture and the fact is i’m just a novice so if you could help me out i would be gratefull.
Thanks in advance…
July 10th, 2009 at 7:29 pm
Hi – this script has been awesome – thanks so much. I’ve since managed to adapt it to use the scroller part alone as a navigation bar, and now I’m going back to the original for a gallery.
Here’s my question – what would you add to center each large image in the largeImage_mc instance, rather than having them all load at the top-left position?
Thanks in advance if you have a chance to answer.