From PanoZona
ImageButton |
Author | Marek Standio |
Module version | 1.3 |
Compatibility | SaladoPlayer 1.0 + |
ImageButton allows creating simple buttons from external image files, placing them in panorama window and configuring actions executed on interaction with user. Single button can be used as banner for opening external urls, it can also be used to show additional information, or turn on/off other modules. Each button can be individually opened/closed.
Configuration structure
Configuration details
ImageButton
Attribute | Type | Sub-attribute | Type | Default | Values | Description |
path | S | - | - | path to swf file | Mandatory attribute. Value points to module swf file. |
button
Attribute | Type | Sub-attribute | Type | Default | Values | Description |
id | S | - | - | - | Mandatory attribute. Must be unique amonng other butttons. |
path | S | - | - | path to image file | Mandatory attribute. Path to image used as button, it also should work with swf file. |
action | S | - | - | action id | Action executed on button mouse click. |
mouse | O | onOver | S | - | action id | Determines what action will be executed when user moves cursor over button. |
onOut | S | - | action id | Determines what action will be executed when user moves cursor out of button. |
window
Attribute | Type | Sub-attribute | Type | Default | Values | Description |
align | O | horizontal | S | left | left, right, center | Horizontal alignment of button against panorama window. |
vertical | S | top | top, middle, bottom | Vertical alignment of button against panorama window. |
move | O | horizontal | N | 0 | - | Number of pixels button is moved horizontally. |
vertical | N | 0 | - | Number of pixels button is moved vertically. |
open | B | - | true | true, false | Determines if given button is visible. |
transition | O | type | S | fade | fade, slideUp, slideDown, slideLeft, slideRight | Determines kind of transition used when button is opening/closing. |
openTween | O | transition | F | Linear.easeNone | avaible functions | Determines type of animation used when button is opening. |
time | N | 0.5 | - | Duration in seconds of button opening animation. |
closeTween | O | transition | F | Linear.easeNone | avaible functions | Determines type of animation used when button is closing. |
time | N | 0.5 | - | Duration in seconds of button closing animation. |
onOpen | S | - | - | action id | Action called when button changes state to closed. |
onClose | S | - | - | action id | Action called when button changes state to opened. |
subButton
Attribute | Type | Sub-attribute | Type | Default | Values | Description |
id | S | - | - | - | Mandatory attribute. Must be unique amonng other subButttons. |
path | S | - | - | path to image file | Mandatory attribute. Path to image used as button, it also should work with swf file. |
action | S | - | - | action id | Action executed on button mouse click. |
mouse | O | onOver | S | - | action id | Determines what action will be executed when user moves cursor over button. |
onOut | S | - | action id | Determines what action will be executed when user moves cursor out of button. |
move | O | horizontal | N | 0 | - | Number of pixels button is moved horizontally. |
vertical | N | 0 | - | Number of pixels button is moved vertically. |
singleState | B | - | false | true, false | Set this value to true if your image represents just single bitmap and your subButton is not supposed to have distinctive active state. Otherwise your button bitmap should consist of two button bitmaps, one over another, separated with 1px line. |
Functions
setOpen
Type | Description | Function description |
S | button id | Sets open value of given button using openTween or closeTween. |
B | open value |
toggleOpen
Type | Description | Function description |
S | button id | Sets open attribute of given button to opposite value. |
setActive
Type | Description | Function description |
S | subButton id | Sets active state of given subBtton. |
B | avtive value |