Module:MenuScroller

From PanoZona

Contents

MenuScroller
Author Marek Standio
Module version 1.3.3
Compatibility SaladoPlayer 1.0 +

MenuScroller creates simple and intuitive in use list of panoramas thumbnails. You can use images of different sizes, module will scale them to eqal size, preserving aspect ratio. List can be opened/closed with use of tweens and transition effects. You can change its alignment position and size - it can fill panorama window width or height and if number of images will exceed avaible space, list will become scrollable. It will indicate if currently viewed panorama is one any of list elements is tergetting to. Module can be used to other purposes than navigation between panoramas, you can assign custom actions on extraElements.

Configuration structure

Configuration details

MenuScroller

Attribute TypeSub-attribute TypeDefaultValuesDescription
path S - - path to swf file Mandatory attribute. Value points to module swf file.

window

Attribute TypeSub-attribute TypeDefaultValuesDescription
open B - true true, false Determines visibility of module window on SaladoPlayer start.
alpha N - 1.0 0.1 to 1.0 Transparency of module window background.
minSize O width N 100 - Minimal width of module window.
height N 100 - Minimal height of module window.
maxSize O width N 250 - Maximal width of module window.
height N 2000 - Maximal height of module window.
align O horizontal S left left, center, right Horizontal alignment against panorama window.
vertical S middle top, middle, bottom Vertical alignment against panorama window.
margin O top N 0 - Minimal distance from module window and top border of panorama window.
bottom N 0 - Minimal distance from module window and bottom border of panorama window.
left N 0 - Minimal distance from module window and left border of panorama window.
right N 0 - Minimal distance from module window and right border of panorama window.
transition O type S slideLeft fade, slideUp, slideDown, slideLeft, slideRight Determines kind of transition used when module window is opening / closing.
openTween O transition F Linear.easeNone avaible functions Determines type of animation used when module window is opening.
time N 0.5 - Duration in seconds of module window opening animation.
closeTween O transition F Linear.easeNone avaible functions Determines type of animation used when module window is closing.
time N 0.5 - Duration in seconds of module window closing animation.
onOpen S - - action id Action called when module window changed state to closed.
onClose S - - action id Action called when module window changed state to opened.

scroller

Attribute TypeSub-attribute TypeDefaultValuesDescription
style O color N #000000 #000000 to #FFFFFF Color of scroller background.
alpha N 0.75 0.1 to 1.0 Alpha of scroller background.
spacing N - 40 - Spacing between displayed elements.
padding N - 20 - Distance of elements from window border.
speed N - 0.1 - Speed of of elements scrolling.
overTween O transition F Linear.easeNone avaible functions Determines type of animation used when module window is opening.
time N 0.5 - Duration in seconds of module window opening animation.
outTween O transition F Linear.easeNone avaible functions Determines type of animation used when module window is opening.
time N 0.5 - Duration in seconds of module window opening animation.

group

Attribute TypeSub-attribute TypeDefaultValuesDescription
id S - - - Mandatory attribute. Must be unique among other groups.

element

Attribute TypeSub-attribute TypeDefaultValuesDescription
target S - - panorama id Mandatory attribute. Determines which panorama to load when element button is clicked.
path S - - path to image file Mandatory attribute. Points to image that represents panorama element is targeting to. image can be of any size, but it is recommended to use small ones. It should also work with swf files.
mouse O onOver S - action id Action executed when mouse moves over element.
onOut S - action id Action executed when mouse moves out of element.

extraElement

Attribute TypeSub-attribute TypeDefaultValuesDescription
id S - - - Mandatory attribute. Must be unique among other extraButtons.
action S - - action id Mandatory attribute. Determines which action to execute when user clicks on extraElement.
path, mouse - - - - See attributes in element.

close

Attribute TypeSub-attribute TypeDefaultValuesDescription
path S - - path to image file Image file that will be used as close button. If path is not set, close button will not be added.
align O horizontal S right left, center, right Horizontal alignment against module window.
vertical S top top, middle, bottom Vertical alignment against module window.
move O horizontal N 0 - Number of pixels close button is moved horizontally.
vertical N 0 - Number of pixels close button is moved vertically.

Functions

setOpen

TypeDescriptionFunction description
B Value assigned to open attribute. Opens / closes map window on demand. Opening window once window is open makes no effect, same thing for closing window.

toggleOpen

TypeDescriptionFunction description
- - Calling this function toggles map window open state. If called when window is opened it closes window, same thing other way around.

setGroup

TypeDescriptionFunction description
S Id of group. Function sets currenty displayed group of elements.

setActive

TypeDescriptionFunction description
S Id of extraElement. Function sets active state of extraElement of given id to given value.