Zen Flash Gallery
Zen Flash Gallery author's design and smart usability make it the most elegant way to present your media content
Help > Zen Flash Gallery > Flash Component > Component API
Zen Flash Gallery - Component API
| Method name | Description |
|---|---|
| addAlbum():Number |
Adds a new album. Returns album's number. Examplevar album1 = gallery.addAlbum(); gallery.setAlbumDescription( album1, "SummerPhotos" ); |
| setAlbumDescription( album: Number, description: String ); |
Sets album's description. Examplevar album1 = gallery.addAlbum(); gallery.setAlbumDescription( album1, "SummerPhotos" ); |
| setAlbumIcon( album: Number, iconURL: String ); |
Sets album's icon. Examplevar album1 = gallery.addAlbum(); gallery.setAlbumIcon( album1, "images/icon1.png" ); |
| setThumbnailsFolder( album: Number, folder: String ); |
Specifies the path to the folder containing thumbnails. If the folder path is not defined then value "" is used. Examplevar album1 = gallery.addAlbum(); gallery.setThumbnailsFolder( album1, "icons/" ); |
| setImagesFolder( album: Number, folder: String ); |
Specifies the path to the folder containing large images. If the folder path is not defined then value "" is used. Examplevar album1 = gallery.addAlbum(); gallery.setImagesFolder( album1, "images/" ); |
| addImage( album: Number, imageData: Object ); |
Adds a new image to the album. imageData.image: String - Path to the image file (or library symbol name) imageData.thumbnail: String - Path to the icon file (or library symbol name) imageData.caption: String - Image caption Example gallery.addImage( album1, {image:"image1.jpg", thumbnail: "thumb1.jpg", caption: "Ha Ha!"} ); |
| buildGallery(); |
This method either creates a new gallery or rebuilds an existing gallery basing on the given settings. Example |
| Property name | Example |
|---|---|
| cacheRadius Radius of gallery cache |
To get value: trace(instanceName.cacheRadius); To set new value: instanceName.cacheRadius =2; |
| dropShadow Show/hide gallery shadow |
To get value: trace(instanceName.dropShadow); To set new value: instanceName.dropShadow =true; |
| frameSize: Number Frame thickness |
To get value: trace(instanceName.frameSize); To set new value: instanceName.frameSize=5; |
| frameColor: 32-bit unsigned integer Frame color |
To get value: trace(instanceName.frameColor); To set new value: instanceName.frameColor=0xFFFFFF; |
| cornerRadius: Number Corner radius for gallery background and gallery frame |
To get value: trace(instanceName.cornerRadius); To set new value: instanceName.cornerRadius=7; |
| backgroundColor: 32-bit unsigned integer Background color inner frame for the first time downloading images |
To get value: trace(instanceName.backgroundColor); To set new value: instanceName.backgroundColor=0xAAC5D8; |
| initialState: String Initial state of the gallery |
To get value: trace(instanceName.initialState); To set new value: instanceName.initialState="Start Slideshow"; |
| showCaption: String Defines when to show an image caption |
To get value: trace(instanceName.showCaption); To set new value: instanceName.showCaption="Always"; |
| captionBackgroundAlpha: Number Caption background transparency |
To get value: trace(instanceName.captionBackgroundAlpha); To set new value: instanceName.captionBackgroundAlpha=41; |
| captionBackgroundCornerRadius: Number Corner radius of caption background |
To get value: trace(instanceName.captionBackgroundCornerRadius); To set new value: instanceName.captionBackgroundCornerRadius=6; |
| buttonsBackgroundAlpha: Number Buttons background transparency |
To get value: trace(instanceName.buttonsBackgroundAlpha); To set new value: instanceName.buttonsBackgroundAlpha=41; |
| buttonsBackgroundCornerRadius: Number Corner radius of buttons Background |
To get value: trace(instanceName.buttonsBackgroundCornerRadius); To set new value: instanceName.buttonsBackgroundCornerRadius=6; |
| showButtons: String Defines when to show the buttons |
To get value: trace(instanceName.showButtons); To set new value: instanceName.showButtons="Always"; |
| showAlbumsButton: String Show/hide albums button |
To get value: trace(instanceName.showAlbumsButton); To set new value: instanceName.showAlbumsButton=true; |
| showThumbnailsButton: Boolean Show/hide thumbnails button |
To get value: trace(instanceName.showThumbnailsButton); To set new value: instanceName.showThumbnailsButton=true; |
| showSlideshowButton: Boolean Show/hide "play/pause" buttons |
To get value: trace(instanceName.showSlideshowButton); To set new value: instanceName.showSlideshowButton=true; |
| showNavigationButton: Boolean Show/hide "next/previous" buttons |
To get value: trace(instanceName.showNavigationButton); To set new value: instanceName.showNavigationButton=true; |
| slideshowDelay: Number Image display duration in Slideshow mode (in seconds) |
To get value: trace(instanceName.slideshowDelay); To set new value: instanceName.slideshowDelay=4; |
| rotationDirection: String Rotation direction |
To get value: trace(instanceName.rotationDirection); To set new value: instanceName.rotationDirection="Vertical CW"; |
| rotationDuration: Number Duration of rotation |
To get value: trace(instanceName.rotationDuration); To set new value: instanceName.rotationDuration=700; |
| panelBackgroundAlpha: Number Transparency of panel icons and albums |
To get value: trace(instanceName.panelBackgroundAlpha); To set new value: instanceName.panelBackgroundAlpha=43; |
| iconWidth: Number Icons width |
To get value: trace(instanceName.iconWidth); To set new value: instanceName.iconWidth=90; |
| iconHeight: Number Icon height |
To get value: trace(instanceName.iconHeight); To set new value: instanceName.iconHeight=55; |
| iconPadding: Number Distance between icons in the list |
To get value: trace(instanceName.iconPadding); To set new value: instanceName.iconPadding=10; |
| XMLFile: String Full Path to XML configuration file (contains filename) |
To get value: trace(instanceName.XMLFile); To set new value: instanceName.XMLFile="gallery.xml"; |
| rotationSound: String Path to rotation sound file with rotation |
To get value: trace(instanceName.rotationSound); To set new value: instanceName.rotationSound="rotation.mp3"; |
| clickSound: String Path to the file with sound of click |
To get value: trace(instanceName.clickSound); To set new value: instanceName.clickSound="click.mp3"; |
| overSound: String Path to the file with sound of mouseover |
To get value: trace(instanceName.overSound); To set new value: instanceName.overSound="over.mp3"; |
| overSound: String Path to the file with sound of mouseover |
To get value: trace(instanceName.overSound); To set new value: instanceName.overSound="over.mp3"; |
| useEmbeddedFont: Boolean Use embedded font |
To get value: trace(instanceName.useEmbeddedFont); To set new value: instanceName.useEmbeddedFont=true; |
| fontName: String Name of the font used for captions (works for useEmbeddedFont set to false only) |
To get value: trace(instanceName.fontName); To set new value: instanceName.fontName="Arial"; |
| fontSize: Number Size of the font used for captions (works for useEmbeddedFont set to false only) |
To get value: trace(instanceName.fontSize); To set new value: instanceName.fontSize=9; |
| useRotation: Boolean When set to "true" this parameter enables the rotation transition effect, otherwise fade effect is used |
To get value: trace(instanceName.useRotation); To set new value: instanceName.useRotation=false; |




