How To Build a Flash Gallery with ActionScript 3 and Milkbox

In this tutorial I will explain how you can build a Flash gallery with Actionscript 3 and Milkbox. Milkbox is a modal window, similar to Lightbox. The advantages of milkbox are that you store the paths of your images in a XML file and call these paths via JavaScript. Milkbox supports images and SWFs and you can customize the modal window with CSS easily.

The Plan

View the Gallery we will be building

First I will load the thumbnails in my Flash movie and position them in a grid. The columns of the grid can be changed dynamically via a global variable. Then I will add the milkbox functions to my code. So when you click on a thumbnail, the corresponding bigger image will open in the milkbox window.

(more…)