hide side navigation
    5 most recent
    Web Services
    Library's
    Component's
    Applications
  Tree menu  Flex 2 Guestbook  Videobox  Simple mp3 player  Videoroom  Moving menu  Flash db board reader  Simple photo gallery  Simplecart and External Interface  Email in Flash II  Photo and Video gallery  New Store  Flash GuestBook V2  Flash-db Miniboard  ActionScript dictionary  Private chat with FlashCom  Flash Whois  An online store  Flash RSS reader  Net Tools - Whois in Flash  Flash Message Board  Flash GuestBook  Email in Flash  Sending Custom Ecards  Simple Live Counter with PHP
    Articles
 Read Full Documentation >>

Simple photo gallery
Author: Dan Loaiza (papachan)

Photo gallery first version

This is a simple photo gallery. On the first version for Flash 7, you use a textfile as the source for your images. The gallery will take all the images (and his titles) and show in a slide show for you, that's it. Ready to use, and easy to change some properties like width, height, and time duration.

The second version use Flash 8, an XML file as the source for images and adds a blur effect for transitions.

Something important: you can load this gallery in your own movie, since is totally isolated and will not break the workflow, just remember that the main movie should be published in AS2. The textfile you use as the source (example included) have this fields:

img -- name of the file
delay --time (in milliseconds) for the image to be show (important ! to respect the duration Tweening effect, not a delay inferior of 2700 milliseconds)
cant -- (important field) the numbers of images present

Image Files
Images File can be in different folders, just set the path.

Parameters you can set inside the fla:
Imagewidth, ImageHeight : the ImageGallery use a mask just set this property to a specific value and you the image will be crop inside a mask width and height properties.
Duration is the parameter of the Tweening Effect.

About the classes used
funcGallery: have a static function to draw a rectangle
fotogallery: here it have the controller to show one image, preload the other and tween to alpha the loaded image
composer: a extended class of MovieClip class to create TextField and update it.
throw_error: a static function to show loading errors
StageMain: a main function to start the application and call the different classes
mathNum: a static function to have a switcher between two elements
LoaderVars: a class who encapsulate the loadVars event to connect to one URL and return into an array.
Gdispatcher: class from Grant Skinner, a usefull broadcast of dynamics events objects

Download the source files for the first version

Ok, here's the working example of the second version (requires Flash Player 8 )  and the source files