Class imagegal.MainMenu

Description

This is the main menu class for the gallery. It actually forms the content_mc movieclip of MouseScrollBox class used in this file. The scrollbox helps to scroll through the menu items based on mouse position.

The following events are dispatched by this class:

MenuItemClicked - dispatched when the a menu item is clicked. It's event object has a property xmlpath that holds thae path to the gallery xml file corresponding to the menu item clicked

MainMenuInit - dispatched afer the initializatio the menu items

Field Index

isActive

Method Index

new MainMenu()
addEventListener(), enable(), init(), registerListener(), removeEventListener()

Constructor Detail

MainMenu

public function MainMenu()

Field Detail

isActive

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

Method Detail

init

public function init(arr:Array, rows:Number, gapval:Number)

Use this method to initialize the menu.

Parameters

arr- the array of objects containing menuitems' details
rows- number of rows for the menu
gapval- the gap between each menu item

enable

public function enable()

Use this function to enable all the items of the menu.

registerListener

public function registerListener(mc:MovieClip)

Use this method to register any movieclip as a listener to the events of this class.

Parameters

mc- the movieclip that is to be registered

addEventListener

public function addEventListener()

removeEventListener

public function removeEventListener()