Class imagegal.ThumbList

Description

This is the thumb list class for the gallery. It actually forms the content_mc movieclip of VerticalScrollBox class used in this file. The scrollbox helps to scroll through the thumbnails items.

The following events are dispatched by this class:

ThumbClicked - dispatched when the a thumb is clicked. The loadObj property of the event object has all the datails required to load the right image when a thumbnails is clicked. The 'before' image is retrieved as loadObj.bimg and the 'after' as loadObj.aimg.

ThumbListInit - dispatched afer the initialization of the list

Field Index

colNum, isActive, thumbGap, thumbHeight, thumbWidth, totalThumbs

Method Index

new ThumbList()
addEventListener(), imgInfo(), imgPath(), imgTitle(), loadXML(), registerListener(), removeEventListener()

Constructor Detail

ThumbList

public function ThumbList()

Field Detail

isActive

public isActive:Boolean
Use this property to get or set wether the list is active or not. This property is used by PhotoRetoucherGallery class to manage the alignments of the list on the stage.

thumbWidth

public thumbWidth:Number [Read Only]
Use this property to get the width of the thumbnail. It is set when the gallery xml file is parsed. This property is used by Thumb class to align and scale the thumbnails properly.

thumbGap

public thumbGap:Number [Read Only]
Use this property to get the gap between thumbnails alignments. It is set when the gallery xml file is parsed. This property is used by Thumb class to align and scale the thumbnails properly.

thumbHeight

public thumbHeight:Number [Read Only]
Use this property to get the height of the thumbnail. It is set when the gallery xml file is parsed. This property is used by Thumb class to align and scale the thumbnails properly

colNum

public colNum:Number [Read Only]
Use this method to get the number of columns of thumbnails the list has

totalThumbs

public totalThumbs:Number [Read Only]
Use this method to get the total number of thumbnails

Method Detail

loadXML

public function loadXML(path:String)

Use this method to load gallery XML file.

Parameters

path- path of the XML file

registerListener

public function registerListener(mc:MovieClip)

Use this method to register any movieclip as a listener to this class' events

Parameters

mc- the movieclip that is to be registered

imgPath

public function imgPath(i:Number):String

Use this function to get the path of the image to be loaded for a particular thumbnail

Parameters

i- the number of the thumbnail

Return

- the path of the image

imgTitle

public function imgTitle(i:Number):String

imgInfo

public function imgInfo(i:Number):String

addEventListener

public function addEventListener()

removeEventListener

public function removeEventListener()