Module:ExampleModule

From PanoZona

Contents

ExampleModule
Author Marek Standio
Module version 0.5
Compatibility SaladoPlayer 0.7 +

ExampleModule serves no other purpose then demonstraiting api solutions. Module cooperates with NavigationBar, new extra button is shown that indicates and controlls ExampleModule visibility. Example module also demonstrates methods of obtaining data from configuration. Moudule source files are well commented, it is good starting point for creating new module.

Configuration structure

Configuration details

ExampleModule

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

settings

Attribute TypeSub-attribute TypeDefaultValuesDescription
Parent: ExampleModule
open B - true true, false Determines visibility of module on SaladoPlayer start.
onOpen S - - action id Action executed on module closing.
onClose S - - action id Action executed on module opening.
tween O transition F Linear.easeNone avaible functions Determines type of animation used when module window is opening/closing.
time N 0.5 - Duration in seconds of module window opening/closing animation.


align O horizontal S left left, right, center Number of pixels element is moved horizontally.
vertical S middle top, middle, bottom Vertical alignment of element against panorama window.
move O horizontal N 10 - Number of pixels element is moved horizontally.
vertical N 0 - Number of pixels element is moved vertically.

someParent

Attribute TypeSub-attribute TypeDefaultValuesDescription
Parent: ExampleModule
info O booleanSubValue B false true, false Sample Boolean sub-attribute.
numberSubValue N NAN - Sample Number sub-attribute.
stringSubValue S - - Sample String sub-attribute.

someChild

Attribute TypeSub-attribute TypeDefaultValuesDescription
Parent: someParent
happy B - - - Sample Boolean value.

someToy

Attribute TypeSub-attribute TypeDefaultValuesDescription
Parent: someChild
name S - - - Sample String value.
price S - - - Sample Number value.

someJob

Attribute TypeSub-attribute TypeDefaultValuesDescription
Parent: someParent
Wages N - - - Sample Number value.
text S - - - Sample String value. Name of this attribute indicates, that its value can either be obtained traditionally, or by adding CDATA child to someJob node.

Exposed functions

toggleVisibility

TypeDescriptionFunction description
- - Calling this function toggles module visibility. If called when module is visible it hides module, same thing other way around.

echoNothing

TypeDescriptionFunction description
- - Prints mesaage hard-coded into module.

echoBoolean

TypeDescriptionFunction description
B Sample Boolean value. Function prints given Boolean value trace window.

echoNumber

TypeDescriptionFunction description
N Sample Number value. Function prints given Number value trace window.

echoString

TypeDescriptionFunction description
S Sample String value. Function prints given String value trace window.

echoAll

TypeDescriptionFunction description
B Sample Boolean value. Function prints all given values in trace window.


N Sample Number value.
S Sample String value.