Class bgswitcher.SwitcherPanel

Description

This class is the thumbnail list that you see in the application.The following events are dispatched by this class:

SlideShowToggled - dispatched when the slideshow is switched on or off. The event object has the following properties:
onoff - A string that values to either "true" or "false" denoting the state of the slideshow.

ThumbClicked - dispatched when a thumbnail in the thumblist is clicked The event object has the following properties:
image - A string that holds the image corresponding to the thumbnail clicked.

num - A zero based integer that holds the number of the thumbnail that was clicked.

Field Index

bg_mc, scrolling, slideShowOn

Method Index

new SwitcherPanel()
addEventListener(), init(), removeEventListener(), toggleSlideShow()

Constructor Detail

SwitcherPanel

public function SwitcherPanel()

Field Detail

bg_mc

public bg_mc:MovieClip

scrolling

public scrolling:Boolean [Write Only]
Use this property to set whether the switcher is scrolling or not.

slideShowOn

public slideShowOn:Boolean
Use this property to get or set wehther the slideshow is on or not.

Method Detail

init

public function init(imgarr:Array, scroll:String, dim:Number, tnum:Number, gap:Number, twidth:Number, theight:Number, sson:String)

Use this method to initialize the switcher panel.

Parameters

imgarr- an array containing all the image objects that are extracted from the XML file. Each image object in the array contains information about the paths of thumbnail and corresponding image
scroll- the direction of the scroll - either horizontal or vertical
dim- the dimension of the switcher panel. This is the height of the panel if the scroll type is vertical and width if the scroll type is horizontal
tnum- the number of columns of thumbnails, if the scroll type is vertical and number of rows if the scroll type is horizontal
gap- the gap between the thumbnails
twidth- the width of each thumbnail. This is used by the application to align the thumbnails properly
theight- the height of each thumbnail. This is used by the application to align the thumbnails properly
sson- A string that evaluated itself to either "true" or "false" stating if the slideshow is on/off when the application starts

toggleSlideShow

public function toggleSlideShow()

This method can be used to toggles slideshow on/off

addEventListener

public function addEventListener()

removeEventListener

public function removeEventListener()