The following parameters are supported:
In VRSmarty xml file:
| xmlFile | xmlFile='myCarousel.xml' | plugin control XML file, default=carousel.xml |
Plugin attributes:set with spot_id.content.name=value
| diameter | diameter=65% | carousel diameter, in pixels or percentage (default=200) |
| angle | angle=70 | carousel angle in degrees, 0=vertical, 90=horisontal (default=60) |
| spin | spin=T | carousel constant spinning, see <carousel> tag below, any other value
will toggle spin on/off |
Plugin methods: call with spot_id.content.name(value)
| select(id) | select('pano3') | set thumbnail as selected |
| expand(sw) | expand(T) | 0 or 1, anything else will toggle expanding |
| | can also be used at startup to set initial status |
| collapse(sw) | collapse(T) | 0 or 1, anything else will toggle collapsing |
| | same function as expand, but inverted |
Plugin external xml file:
| In <carousel> tag: |
| visible | visible="0" | 0 or 1, anything else will toggle visibility |
| diameter | diameter="75%" | carousel radius, in pixels or as a percentage (default=200) |
| angle | angle="70" | carousel angle in degrees, 0=vertical, 90=horisontal (default=60) |
| spin | spin="1" | carousel constant spinning: 0=no spin, 1=clockwise spin, -1=anticlockwise spin, default:0 |
| startCollapsed | startCollapsed="1" | initial carousel status, 0 or 1 |
| onClick | onClick="hide" | behaviour after clicking thumbnail, useful with parameter choiceField=0 |
|
| In <images> tag: |
| size | size="100:67" | thumbnail size, default=100:67 |
| frameColor | frameColor="#000000" | selected thumbnail frame color, default=#FFFFFF |
| bgColor | bgColor="#FFFFFF" | selected thumbnail text background color, default=#333333 |
| mouseFrame | mouseFrame="1" | frames the thumbnail at mouseOver (default 1) |
| mouseTextBg | mouseTextBg="0" | show thumbnail text background at mouseOver (default 1) |
| font | font="Comic Sans MS" | thumbnail text font, default=Arial |
| textSize | textSize="10" | thumbnail text size, default 10 |
| textColor | textColor="#404040" | thumbnail text color, default #FFFFF0 |
|
| In <image> tag: |
| id | id="pano5" | thumbnail id |
| text | text="Train Station" | thumbnail text |
| url | url="pics/pano8.jpg" | thumbnail url |
| onClick | onClick="global.goPano2" | thumbnail onClick command |
| onOver | onOver="pic3.visible=1" | thumbnail onOver command |
| onOut | onOut="pic3.visible=0" | thumbnail onOut command |
| selected | selected="1" | thumbnail selected at start |
Example of plugin xml file:
<?xml version = '1.0'?>
<carousel
diameter="60%"
angle="77"
spin="1"
startCollapsed="0"
mouseFrame="0"
mouseTextBg="0"
>
<images
size="100:67"
bgColor="#404040"
frameColor="#FFFFFF"
font="Comic Sans MS"
textSize="10"
textColor="#E0E0E0"
>
<image text="The Train Bridge" url="/panos/images/thumbs/pano3.jpg" onClick="goBridge()" onOver="p3.visible=1" onOut="p3.visible=0" />
<image text="Maria Hill" url="/panos/images/thumbs/maria.jpg" onClick="goMaria()" onOver="p4.visible=1" onOut="p4.visible=0" />
<image text="City Hall Tower" url="/panos/images/thumbs/cityhall.jpg" onClick="goTower()" onOver="p1.visible=1" onOut="p1.visible=0" />
<image text="%C5SS bridge" url="/panos/images/thumbs/ass.jpg" onClick="goASS()" onOver="p5.visible=1" onOut="p5.visible=0" />
<image text="Hammarby Gates" url="/panos/images/thumbs/hammarbyslussen1.jpg" onClick="goGates()" onOver="p7.visible=1" onOut="p7.visible=0" />
<image text="T.Knutsson Street" url="/panos/images/thumbs/torkelknutsson.jpg" onClick="goTorkel()" onOver="p11.visible=1" onOut="p11.visible=0" />
<image text="The Yatch Club" url="/panos/images/thumbs/yachtclub.jpg" onClick="goYatchs()" onOver="p6.visible=1" onOut="p6.visible=0" selected="1" />
<image text="Under the bridge" url="/panos/images/thumbs/arstaviken7.jpg" onClick="goBridge()" onOver="p9.visible=1" onOut="p9.visible=0" />
<image text="Small bridge" url="/panos/images/thumbs/arstaviken8.jpg" onClick="goMaria()" onOver="p10.visible=1" onOut="p10.visible=0" />
<image text="City Hall Yard" url="/panos/images/thumbs/cityyard.jpg" onClick="goTower()" onOver="p2.visible=1" onOut="p2.visible=0" />
<image text="%C5SS bridge" url="/panos/images/thumbs/ass.jpg" onClick="goASS()" onOver="p5.visible=1" onOut="p5.visible=0" />
<image text="Hammarby Gates" url="/panos/images/thumbs/hammarbyslussen1.jpg" onClick="goGates()" onOver="p7.visible=1" onOut="p7.visible=0" />
<image text="The Årsta Bridge" url="/panos/images/thumbs/arstabron11.jpg" onClick="goTorkel()" onOver="p12.visible=1" onOut="p12.visible=0" />
<image text="The Yatch Club" url="/panos/images/thumbs/arstaviken4.jpg" onClick="goYatchs()" onOver="p8.visible=1" onOut="p8.visible=0" />
</images>
</carousel>
NOTES:
Parameter names are not case sensitive ("FrameColor" is equal to framecolor").
Carousel rotation (except for the slow constant rotation, if chosen) is activated
by mouse-over. When moving the mouse over the left part, the carousel will rotate counter-
clockwise and vice versa. The rotation will be halted when the mouse is in the center part
the width of a thumbnail.
The
selected thumbnail is always
framed.
Thumbnail texts will span over several lines if necessary. They can contain newline ("\n")
codes to control line breaks.
If you are using the
&" characters inside the "command" parameters in the xml file, you have to
encode them
as follows:
& as %26
" as %22
You can also enclose your tag data with <![CDATA[ ... ]]> which makes the xml parser ignore any
special characters.
The
select(id) command can be used at any time to select a thumbnail. If a new pano is loaded
by another method than clicking an image, using the command: "
spot_id.content.select('xx')"
will select the corresponding thumbnail.
Version history: