From PanoZona
JSGateway |
Author | Marek Standio |
Module version | 1.3.2 |
Compatibility | SaladoPlayer 1.0 + |
JSgateway is simple module that allows executing SaladoPlayer actions via JavaScript and calling Javascript functions with SaladoPlayer actions. With little additional javascript code you can make actions to open URLS, display additional content in html page in which SaladoPlayer is embeded, and so on. Configuration describes communication in direction SaladoPlayer -> Javascript.
Configuration structure
Configuration details
JSGateway
Attribute | Type | Sub-attribute | Type | Default | Values | Description |
path | S | - | - | path to swf file | Mandatory attribute. Value points to module swf file. |
settings
Attribute | Type | Sub-attribute | Type | Default | Values | Description |
callOnEnter | B | - | false | true,false | Determines is javscript function of specified name is called on every entering to new panorama. |
callOnTransitionEnd | B | - | false | true,false | Determines is javscript function of specified name is called on every transition end after entering to new panorama. |
callOnMoveEnd | B | - | false | true,false | Determines is javscript function of specified name is calles on every end on moveTo function. |
callOnViewChange | B | - | false | true,false | Determines is javscript function of specified name is calles on every camera move. |
jsfunction
Attribute | Type | Sub-attribute | Type | Default | Values | Description |
id | S | - | - | - | Mandatory atribute. Must be unique among other jsfunctions. |
name | S | - | - | - | Name of javascript function. |
text | S | - | - | - | Argument of javascript function, value of this attribute can also be set as CDATA node, so it can contain text separated by commas and therefore passing many arguments. |
asfunction
Attribute | Type | Sub-attribute | Type | Default | Values | Description |
name | S | - | - | - | Mandatory atribute. Must be unique among other asfunctions. It is used as identifyier of actionscript function exposed to javascript. |
callback | S | - | - | - | Value must be pointing to specific function inside player. See examples for details. |
Exposed functions
run
Type | Description | Function description |
S | jsfunction id | Calls jsfunction of given id that in turn calls JavaScript function of defined name with defined argument. |