Advanced Flash Components
Search!
Search!
Home >  Components >  IMG Loop >  API Documentation
API Documentation
IMG Loop V. 1.0 Documentation
Properties
Name Type Description
background Boolean Property indicates whether background is displayed (true) or not (false).
backgroundAlpa Number Property indicates background opacity.
backgroundColor Number Property indicates background color.
border Boolean Property indicates whether border is displayed (true) or not (false).
borderAlpha Number Property indicates border opacity.
borderColor Number Property indicates border color.
borderWidth Number Property indicates background width.
content Object Property defines image properties.
  1. data:String – Miscellaneous property
  2. description:String – Image description (String)
  3. imagePath:String – Path to the image file (String)
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_loop/content.xml
description Boolean Property indicates how description bar is displayed.
  1. on:String
  2. off:String
  3. autohide:String
descriptionAlign String Property indicates description bar alignment.
  1. top-left:String
  2. top-center:String
  3. top-right:String
  4. bottom-left:String
  5. bottom-center:String
  6. bottom-right: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.
descriptionFontSize Number Property indicates description font size.
descriptionPadding Object Property defines vertical and horizontal padding.
  1. horizontal:Number – Horizontal Padding
  2. vertical:Number – Vertical Padding
descriptionTextAlign Number Property defines description text alignment.
  1. left:String
  2. center:String
  3. right:String
descriptionWidth Number Property (0-100) determines description bar width. Note that the descriptionWidth is a percentage value based on the component width.
imageBorder Boolean Property indicates whether image border is displayed (true) or not (false).
imageBorderColor Number Property indicates border color.
imageBorderOverColor Number Property indicates border onRollOver color.
imageBorderWidth Number Property determines image border size.
imageBorderPadding Number Property determines image border padding. Distance between border and the image.
imagePadding Object Property defines vertical and horizontal padding.
  1. horizontal:String – Horizontal Padding
  2. vertical:String – Vertical Padding
maintainAspectRatio Boolean Property determines whether to maintain image aspect ratio during image scaling.
preloadAlpha Number Property indicates preloader opacity.
preloader String Property that indicates whether preloader is displayed.
  1. on:String
  2. off:String
preloaderColor Number A Hexadecimal Color Value.
scaleContent Boolean Property defines whether to scale image (true) or not (false). If set to true, images will be resized to fit the height of the component.
scrollDirection String Property determines scroll direction.
  1. left:String
  2. right:String
  3. up:String
  4. down:String
scrollSpeed Number Property (0-10) defines scroll speed.
scrollOverSpeed Number Property (0-10) defines scrolling speed onRollOver event.
scrollLoop Boolean Property defines where to loop (true) gallery contents or not (false). If scrollLoop is set to false then the scroll stops once it reaches the last images.
scrollStart Number Property determines when to start scrolling images. Specify the number of images that need to be loaded before component starts scrolling.
Methods
Name Return Type Description
getItemNum( Number ) Object Function returns content object specified by Number Attribute.

Example

var item:Object = new Object();

item = myLoop.getItemNum(2);

trace("Description: "+item.description);
trace("Path: "+item.path);
trace("Data: "+item.data);
getTotalItems( ) Number Function returns total number of items in the content object.

Example

var items:Number;

items = myLoop.getTotalItems();

trace(items);
addItem( Description:String,
path:String,
data:String
)
Void Functions adds new item.

Example

myLoop.addItem("Image Description", "images/image.jpg", "1");
Events
Name Return Value Description
stateChanged type
target
Triggered when component state changes.
mouseOver type
target
description
path
data
number
Triggered onMouseOver event.

Example

var eventListener = new Object();

eventListener.mouseOver = function (evnt){
 trace(evnt.description);
 trace(evnt.path);
 trace(evnt.data)
 trace(evnt.number)
}
myLoop.addEventListener("mouseOver", eventListener);
mouseOut type
target
description
path
data
number
Triggered onMouseOut event.

Example

var eventListener = new Object();

eventListener.mouseOut = function (evnt){
 trace(evnt.description);
 trace(evnt.path);
 trace(evnt.data)
 trace(evnt.number)
}
myLoop.addEventListener("mouseOut", eventListener);
mouseClick type
target
description
path
data
number
Triggered onMouseClick event.

Example

var eventListener = new Object();

eventListener.mouseClick = function (evnt){
 trace(evnt.description);
 trace(evnt.path);
 trace(evnt.data)
 trace(evnt.number)
}
myLoop.addEventListener("mouseClick", eventListener);
complete type
target
description
path
data
number
Triggered when an image finishes loading.

Example

var eventListener = new Object();

eventListener.complete = function (evnt){
 trace(evnt.description);
 trace(evnt.path);
 trace(evnt.data)
 trace(evnt.number)
}
myLoop.addEventListener("complete", eventListener);
progress type
target
description
path
data
number
bytesLoaded
bytesTotal
percentLoaded
Triggered during image loading.

Example

var eventListener = new Object();

eventListener.progress = function (evnt){
 trace(evnt.description);
 trace(evnt.path);
 trace(evnt.data);
 trace(evnt.number);
 trace(evnt.bytesLoaded); // bytesLoaded of the current image
 trace(evnt.bytesTotal); // bytesTotal of the current image
 trace(evnt.percentLoaded);
}
myLoop.addEventListener("progress", eventListener);
onprogressXML type
target
bytesLoaded
bytesTotal
percentLoaded
Triggered while XML/RSS file is being loaded.

Example

var eventListener = new Object();

eventListener.onprogressXML = function (evnt){
 trace(evnt.bytesLoaded); // bytesLoaded of the current image
 trace(evnt.bytesTotal); // bytesTotal of the current image
 trace(evnt.percentLoaded);
}
myLoop.addEventListener("onprogressXML", eventListener);
oncompleteXML type
target
bytesLoaded
bytesTotal
percentLoaded
Triggered when XML/RSS file is finished loading.

Example

var eventListener = new Object();

eventListener.oncompleteXML = function (evnt){
 trace(evnt.bytesLoaded); // bytesLoaded of the current image
 trace(evnt.bytesTotal); // bytesTotal of the current image
 trace(evnt.percentLoaded);
}
myLoop.addEventListener("oncompleteXML", eventListener);