Advanced Flash Components
Search!
Search!
Home >  Components >  IMG Gallery >  API Documentation
API Documentation
IMG Gallery V. 5.0 Documentation
Properties
Name Type Description
autoLoad Boolean Property indicates whether the content loads automatically.
autoSize Boolean Property indicates whether the gallery is resized to match the image size (true).
backgroundColor Number A Hexadecimal Color Value of the gallery’s background.
borderColor Number Hexadecimal Color Value of the gallery’s border.
buttonColor Number A Hexadecimal Color Value of the gallery’s buttons.
buttonOverColor Number A Hexadecimal Color Value of gallery’s buttons onRollOver state.
content Object Object that that defines image properties.
  1. description:String
  2. imagePath:String – Path to the main image
  3. link:String – Link URL
contentRSS String A String that indicates a path to the RSS 2.0.

Sample Flickr feed:
http://api.flickr.com/services/feeds/photos_public.gne?format=rss_200
contentXML String A String that indicates a path to the XML File.

Sample XML file:
http://www.afcomponents.com/components/img_gallery/content.xml
customButtons Object Property defines custom navigation buttons.
  1. nextImage:String — Property indicates a button clip (Linkage Identifier) in the library. Movie clip must be exported for Action Script.
  2. nextWidth:Number — Property indicates button width.
  3. nextHeight:Number — A Number that indicates button height.
  4. prevImage:String — Property indicates a button clip (Linkage Identifier) in the library. Movie clip must be exported for Action Script.
  5. prevWidth:Number — Property indicates button width.
  6. prevHeight:Number — Property indicates button height.
  7. rewImage:String — Property indicates a button clip (Linkage Identifier) in the library. Movie clip must be exported for Action Script.
  8. rewWidth:Number — Property indicates button width.
  9. rewHeight:Number — Property indicates button height.
  10. ffImage:String — Property indicates a button clip (Linkage Identifier) in the library. Movie clip must be exported for Action Script.
  11. ffWidth:Number — Property indicates button width.
  12. ffHeight:Number — Property indicates button height.
description String Property indicates whether image description is displayed.
  1. on:String
  2. off:String
  3. autohide:String
descriptionColor Number A Hexadecimal Color Value (0x000000) of the image description window background. Description background is always displayed with 50% opacity.
descriptionFont String Property indicates description font. Please note that specified font is not embedded automatically. In order to prevent problems use “safe fonts”.
descriptionFontColor Number Property determines description font color.
easingSpeed Number Property (1-10) indicates easing speed.
easingType String Property indicates easing type.
  1. in:String
  2. out:String
  3. none:String
linkWindow String Property defines window type.
  1. none:String
  2. _self:String
  3. _blank:String
  4. _top:String
maintainAspectRatio Boolean Property indicates whether to maintain aspect ratio when image is loaded and resized.
navigation String Property indicates whether navigation is displayed.
  1. on:String
  2. off:String
  3. autohide:String
preloader String Property indicates whether preloader is displayed.
  1. on:String
  2. off:String
preloaderColor Number A Hexadecimal Color Value of the image preloader.
scaleContent Boolean Property indicates whether the content scales to the gallery size ( true ), or the gallery scales to fit the content ( false ).
slideShow Boolean Property indicates whether images are played in a slideshow (true) .
slideShowLoop Boolean Property determines whether slideshow is looped (true).
slideShowTime Number Property indicates the amount of time (seconds) slideshow is paused on each image.
transition String Property indicates whether transition is displayed.
  1. on:String
  2. off:String
transitionColor Object A colorTransform object that the transition Color. For more information see Color.colorTransform.
Methods
Name Return Type Description
showNext( ) Void Loads next image specified by the contentPath property.
showPrev( ) Void Loads previous image specified by the contentPath property.
Events
Name Return Value Description
init type
target
Triggered when an image starts loading.

Example

var eventListener = new Object();

eventListener.init = function (evnt){
 trace("Component is ready to go");
}
myGallery.addEventListener("init", eventListener);
progress type
target
Triggered while image is loading.

Example

 var eventListener = new Object();

eventListener.progress= function (evnt){
 trace("Loading image");
}
myGallery.addEventListener("progress", eventListener);
error type
target
Triggered if there is an error loading an image.

Example

var eventListener = new Object();

eventListener.error= function (evnt){
 trace("Error occured");
}
myGallery.addEventListener("error", eventListener);
complete type
target
Triggered when an image finishes loading.

Example

var eventListener = new Object();

eventListener.complete = function (evnt){
 trace("Image loaded");
}
myGallery.addEventListener("complete", eventListener);
button_click type
target
Triggered when image button is clicked.

Example

var eventListener = new Object();

eventListener.button_click = function (evnt){
 trace("Button clicked");
}
myGallery.addEventListener("button_click", eventListener);