# Array of Arrays

**URL:** https://forum.kirupa.com/t/array-of-arrays/297108
**Category:** flash
**Created:** [September 25, 2009, 5:08pm UTC](https://forum.kirupa.com/t/array-of-arrays/297108 "2009-09-25T17:08:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![alucardac](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@alucardac](https://forum.kirupa.com/u/alucardac)
#### Post date: [September 25, 2009, 5:08pm UTC](https://forum.kirupa.com/t/array-of-arrays/297108/1 "2009-09-25T17:08:57Z")

</div>

I’ve created a photo gallery that dynamically loads images into a movieclip entitled ‘gallery’. Right now the images are listed in an array. is it possible to make an Array of Arrays so that I could load different Arrays for different image galleries? Is this somewhat how it would work? Lets say I were to switch to a section entitled ‘landscapes’ which we will pretend is the array “var a:Array = new Array();” for now.

```auto

var a:Array = new Array(
"a1.jpg",
"a2.jpg",
"a3.jpg",
);

var b:Array = new Array(
"b1.jpg",
"b2.jpg",
"b3.jpg",
);

var c:Array = new Array(
"c1.jpg",
"c2.jpg",
"c3.jpg",
);

var galleries:Array = new Array(
"a.jpg",
"b.jpg",
"c.jpg"
);

movieclip.addEventListener(MouseEvent.CLICK,showpic);
function showpic(event:MouseEvent) {
loader.load(new URLRequest(galleries[1]));

```
