My Account

Stack Photo Gallery

Get natural looking tool emulating a set of photos for your website. No unnecessary options. Just take and use More Info

Stack Photo Gallery - Component API


Method name Description
addItem(newItemObj:Object);

Adds a new image to the album.

newItemObj — specified in the following way:
newItemObj.source: String — Path to the image file (or library symbol name)
newItemObj.description: String — Image description

Example
instanceName.addItem({source:"image1.jpg", description: "hello world"} );

buildGallery();
This method either creates a new gallery or rebuilds an existing gallery basing on the given settings.

Example
instanceName.buildGallery();

Property name Example

imagesFolder

Path to the folder with images

To get value:
trace(instanceName.imagesFolder);
To set new value:
instanceName.imagesFolder="images/";

caption

Caption settings

To get value:
trace(instanceName.caption.color);
trace(instanceName.caption.fontName);
To set new value:
instanceName.caption={color: 0x000000, fontName: "Arial"};

frameColor: 32-bit unsigned integer

Frame color

To get value:
trace(instanceName.frameColor);
To set new value:
instanceName.frameColor=0xFFFFFF;

imageScaleMode

Image scaling type

To get value:
trace(instanceName.imageScaleMode);
To set new value:
instanceName.imageScaleMode="Fit";

visibleImages

Number of visible images

To get value:
trace(instanceName.visibleImages);
To set new value:
instanceName.visibleImages=4;

usePhotoNumbers

Determines whether or not to display page numbers

To get value:
trace(instanceName.usePhotoNumbers);
To set new value:
instanceName.usePhotoNumbers=true;

soundEffect

Image transition sound. You need to specify a path to your sound file

To get value:
trace(instanceName.soundEffect);
To set new value:
instanceName.soundEffect="sounds/imageChangeEffect.mp3";

bgImage

Background image settings

To get value:
trace(instanceName.bgImage.alpha);
trace(instanceName.bgImage.source);
To set new value:
instanceName.bgImage={alpha:100, source: "images/bg.jpg"};

image

Image size

To get value:
trace(instanceName.image.width);
trace(instanceName.image.height);
To set new value:
instanceName.image={width:300, height:200};

translation

Buttons text

To get value:
trace(instanceName.translation.back);
trace(instanceName.translation.gotoLink);
To set new value:
instanceName.translation={back: "BACK", gotoLink: "Go to Link"};

XMLFile

Full path to XML configuration file (contains filename)

To get value:
trace(instanceName.XMLFile);
To set new value:
instanceName.XMLFile="gallery.xml";