picMenu.swf
FPP external plugin for displaying a scrolling picture menu.The menu can be oriented vertically or horizontally.
Each thumbnail can have OnClick, OnOver and OnOut events.
The plugin reads configuration from external XML file.
Plugin parameters are read from an external xml file with the default name "picMenu.xml".
If you want to use a different filename you can add these lines to the FPP xml file:
This parameter can be URL encoded to allow the XML file to be loaded through server side scripts.
Tags and attributes used in plugin XML file:
NOTES:
Remember when setting a plugin parameter from the FPP XML file, that the plugin name must always be written in lower case, ie. "external.picmenu.salign=BL". Parameter and attribute names are not case sensitive ("bgcolor" is equal to "BGColor"). The menu thumbnails can be oriented horizontally or vertically, depending on the width and height values. So, if menu height is greater than menu width, the thumbnails are stacked vertically. There are three ways to specify menu width or height:
Example plugin XML file:
Version history:
If you want to use a different filename you can add these lines to the FPP xml file:
<picMenu> xmlFile=myPics.xml </picMenu>
Tags and attributes used in plugin XML file:
| In <picMenu> tag: Here you can specify menu attributes as size, position, colors... | ||
| size | size="124:500" | menu size, default=500:111 |
| size="50%:140" | width will be 50% of pano width | |
| size="120:-30" | height will be pano height - 30 | |
| salign | salign="BL" | relative position T(op),M(iddle),B(ottom) and |
| L(eft),C(enter),R(ight) default=TL | ||
| margin | margin="10" | margin to pano edge (used with salign=xx), default=10 |
| margin="15:10" | horizontal:vertical margin | |
| margin="10:0:270:0" | left:top:right:bottom margin (use with width/height 100%) | |
| alpha | alpha="0.60" | menu transparency |
| visible | visible="0" | 0 or 1, any other value toggles menu visibility |
| scrollBar | scrollBar="0" | show scrollbar (default 1) |
| bgColor | bgColor="#CFCFC0" | menu background color, default=not visible |
| frameColor | frameColor="#000000" | menu frame color, default=not visible |
| showAtStart | showAtStart="1" | Setting this parameter to 1 will show menu expanded at startup, default 0 |
| menuHide | menuHide="manual" | never: menu always expanded |
| manual: menu collapsed with arrow button | ||
| auto: menu collapsed when thumbnail clicked - default | ||
| all: visible will be set to 0 after clicking thumbnail | ||
| In <choiceField> tag: These are attributes for the text box in which the name of the current pano is stored | ||
| visible | visible="0" | show field with name of chosen thumbnail (default 1) |
| width | width="140" | width of selected text field, default=#160 |
| font | font="Comic Sans MS" | selected text font, default: Arial |
| textSize | textSize="11" | selected text font size, default: 12 |
| textColor | textColor="#FFFFFF" | selected text font color, default: #FFFFFF |
| bgColor | bgColor="#FFFFFF" | selected text background color, default: transparent |
| frameColor | frameColor="#000000" | selected text frame color, default: no frame |
| text | text="Choose panorama" | initial text if no pano is chosen |
| In <tooltip> tag: Tooltips attributes (use this only if you want to display thumbnail tooltips) | ||
| font | font="Comic Sans MS" | tooltip text font, default: Arial |
| textSize | textSize="10" | tooltip text font size, default: 10 |
| textColor | textColor="#FF0000" | tooltip text color, default: #000000 |
| bgColor | bgColor="#FFFFFF" | tooltip background color, default: transparent |
| frameColor | frameColor="#000000" | tooltip frame color, default: no frame |
| In <id> tag: Thumbnail id attributes (use this only if you want to display thumbnail id) | ||
| font | font="Comic Sans MS" | id text font, default: Arial |
| textSize | textSize="24" | id font size, default=32 |
| textColor | textColor="#FF0000" | id font color, default=#000000 |
| salign | salign="BC" | id alignment within thumbnail, default=MC |
| In <images> tag: Contains attributes that are valid for all thumbnails | ||
| size | size="100:67" | thumbnail size, default=100:67 |
| frameWidth | frameWidth="2.5" | width of thumbnail frame, default=3 |
| frameColor | frameColor="#FFFFF0" | color of thumbnail frame, default=menuBgColor-0x808080 |
| mouseFrame | mouseFrame="1" | frames the thumbnail at mouse-over (default 1) |
| mouseAlpha | mouseAlpha="0" | sets thumbnail alpha to 1 at mouse-over (default 0) |
| mouseScale | mouseScale="1" | increases thumbnail scale at mouse-over (default 0) |
| showId | showId="1" | show thumbnail id, default=0 |
| showText | showText="tooltip" | specifies how to show thumbnail text; below=below thumbnail, |
| tooltip=as tooltip, never=don't show text, default: below | ||
| 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 |
| textOnTop | textOnTop="1" | keeps text on top of thumbnail at mouse-over |
| textVSpace | textVSpace="10" | extra vertical space between thumbnail and text |
| extraVSpace | extraVSpace="8" | extra vertical space below text, default=0 |
| In <image> child tag: You should have one <image> tag for each thumbnail | ||
| id | id="p12" | image id (optional), used as reference when using |
| the imgSelected parameter | ||
| 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 |
The following parameters can be updated dynamically from FPP:
| xmlFile | xmlFile=myconfig2.xml | rebuild menu |
| size | size="124:500" | menu size, default=500:111 |
| size="50%:140" | width will be 50% of pano width | |
| size="120:-30" | height will be pano height - 30 | |
| salign | salign="BL" | relative position T(op),M(iddle),B(ottom) and |
| L(eft),C(enter),R(ight) default=TL | ||
| margin | margin="10" | margin to pano edge (used with salign=xx), default=10 |
| margin="15:10" | horizontal margin:vertical margin | |
| alpha | alpha="0.60" | menu transparency |
| visible | visible="0" | 0 or 1, any other value toggles visibility |
| imgSelected | imgSelected=p5 | set this thumbnail as selected |
| collapse | collapse=T | 0 or 1, anything else will toggle menu state |
| expand | expand=T | 0 or 1, anything else will toggle menu state |
NOTES:
Remember when setting a plugin parameter from the FPP XML file, that the plugin name must always be written in lower case, ie. "external.picmenu.salign=BL". Parameter and attribute names are not case sensitive ("bgcolor" is equal to "BGColor"). The menu thumbnails can be oriented horizontally or vertically, depending on the width and height values. So, if menu height is greater than menu width, the thumbnails are stacked vertically. There are three ways to specify menu width or height:
- As a fixed pixel value: size="124:500"
The menu will keep this size when the pano is resized. - As a percentage: size="50%:140"
The menu will change size when the pano is resized. In this example the menu will always occupy 50% of the pano width. When the setting is 100%, margins will be deducted from menu width/height. - As a fixed negative value: size="-30:120"
The menu will change size when the pano is resized. In this example the menu width will be pano width - 30px.
& as %26
; as %3B
= as %3D
| as %7C
You can also enclose your tag data with <![CDATA[ ... ]]> which makes the xml parser ignore it.
The thumbnail mouseOver effects can be used in any combination.
The imgSelected=xxx parameter can be used at any time to select an image. If a new pano is
selected by any other method (the Google map plugin, for example), you can update this parameter
from FPP ("external.picmenu.imgSelected=nn") and the plugin will select and scroll to image with
id="xxx". If image id is not specified, use image number starting with 1. Setting this parameter
will only select the thumbnail - not execute its onClick command.
If you want to make the text under the thumbnail more visible at mouse-over, you can try using one of the
textOnTop or textVSpace attributes in the <images> tag.
After clicking a thumbnail there is a 3 seconds delay before further clicks are accepted. Furthermore, if
a new pano is being loaded, thumbnail clicks are ignored until loading is complete.
; as %3B
= as %3D
| as %7C
Example plugin XML file:
<?xml version = '1.0'?>
<picMenu
size="138:100%"
alpha="0.4"
salign="TL"
margin="0"
scrollbar="1"
bgColor="#CFCFC0"
frameColor="#000000"
showAtStart="1"
menuHide="auto"
>
<choiceField
visible="1"
width="160"
font="Comic Sans MS"
textSize="12"
textColor="#000080"
bgColor="#FFFFFF"
frameColor="#000000"
/>
<images
size="100:67"
mouseFrame="1"
mouseAlpha="0"
mouseScale="1"
font="Comic Sans MS"
textSize="10"
textColor="#404040"
>
<image text="The Train Bridge" url="pics/pano3.jpg" onOver="menuH.visible=0" onOut="menuH.visible=1" onClick="global.goBridge()" />
<image text="The Yacht Club" url="pics/pano6.jpg" onClick="global.goYachts()" />
<image text="My home" url="pics/pano7.jpg" onClick="global.goHome()" />
<image text="Where I work" url="pics/pano8.jpg" onClick="global.goWork()" onOver="menuH.visible=0" onOut="menuH.visible=1" />
<image text="The Train Bridge" url="pics/pano3.jpg" onClick="global.goBridge()" selected="1" />
<image text="The Yacht Club" url="pics/yachtclub.jpg" onClick="global.goYachts()" />
<image text="My home" url="pics/home.jpg" onClick="global.goHome()" />
</images>
</picMenu>
Version history:
2.17:
menuHide="all" option added - to completely hide the menu after clicking a thumbnail.
Tooltips are now rounded (if tooltip frame or background color is specified).
Clickable scrollbar to make menu scrolling even easier.
Reserving space for left and right margins (if specified) with width=100%. 2.16:
"text" attribute added in <choiceField> tag for setting initial text. 2.15:
Setting plugin alpha will now have immediate effect. 2.14:
Clicking on thumbnails during initial loading is now also ignored. 2.13:
Further clicking on thumbnails should now be ignored until new pano is loaded. 2.12:
Fixed bug when expanding menu after screen size. 2.11:
New defaults in <choiceField> tag: bgColor:transparent, frameColor:no frame.
Support for showing thumbnail text as tooltip.
Support for showing thumbnail id.
New attributes in <images> tag:
showText: specifies how to show thumbnail text.
extraVSpace: for setting extra vertical space below text (vertical mode) 2.10:
Fixed bug when mouseAlpha="1" and thumbnail did not have any text. 2.09:
Modified alpha handling for thumbnail texts (Adobe - grrr!). 2.08:
Added "frameWidth" and "frameColor" attributes in <images> tag to make thumbnail frame appearance more customizable. 2.07:
Added "textOnTop" and "textVSpace" attributes in <images> tag to make thumbnail text more visible at mouse-over.
Added optional "id" attribute in <image> tag for reference in "imgSelected=xxx" command. 2.06:
Fixed a bug so you can now leave out the thumbnail text.
Added a space after the last thumbnail. 2.05:
It is now possible to rebuild the menu from a new XML file with the command: "external.picmenu.xmlfile=...". 2.01:
Fixed a bug when reading thumbnail size from XML file 2.0:
Plugin is now controlled by its own xml file.
OnOver and OnOut events added to each thumbnail. 1.25:
Somewhere along the line the possibility to escape code the image command must have disappeared. This has been corrected.
Handcursor is now used over the images. 1.24:
Parameter "showAtStart" added to make it possible to show the menu expanded at startup, even if parameter "menuHide" is set to "manual" or "auto". 1.23:
Width or height can be expressed as a negative number (example: size=140:-30), which will set the menu size to pano size minus that number. So, when the pano is resized - the menu will also be resized. 1.22:
Modified plugin init code so images don't have to be reloaded when menu is redrawn. 1.21:
Modified scrollbar code for smoother scrolling.
Disables scrolling when all thumbnails are visible.
Fixed scrollbar bug when redrawing menu. 1.20:
Fixed choiceFont bug 1.19:
This code should have been in the 1.18 version, but unfortunately a code mixup happened 1.18:
New parameter "scrollbar" makes it possible to hide the scrollbar.
New parameter "choicefield" makes it possible to hide the name field with the chosen thumbnail.
New parameters "expand" and "collapse" complement the "visible" paramter.
Parameter "size" can now be expressed in percentage of pano size. It is now also supported as a dynamic parameter, which means it can be set at any time.
Parameter "menuBgColor" defaultd to "not visible".
Parameter "menuFrameColor" defaultd to "not visible".
Menu onOver scroll limits and speed modified. 1.17:
The "imgSelected=nn" parameter can now bed at any time.
A delay has been added: After clicking an image, further clicks are discarded for 3 seconds (default - to, set parameter "clickDelay=n.n" seconds). 1.15:
Thumbnail mouseOver effects added.
MouseOver scrolling at menu endpoints modified. 1.11:
Parameter "visible" added. 1.10:
Thumbnail texts can span over several lines.
menuHide="all" option added - to completely hide the menu after clicking a thumbnail.
Tooltips are now rounded (if tooltip frame or background color is specified).
Clickable scrollbar to make menu scrolling even easier.
Reserving space for left and right margins (if specified) with width=100%. 2.16:
"text" attribute added in <choiceField> tag for setting initial text. 2.15:
Setting plugin alpha will now have immediate effect. 2.14:
Clicking on thumbnails during initial loading is now also ignored. 2.13:
Further clicking on thumbnails should now be ignored until new pano is loaded. 2.12:
Fixed bug when expanding menu after screen size. 2.11:
New defaults in <choiceField> tag: bgColor:transparent, frameColor:no frame.
Support for showing thumbnail text as tooltip.
Support for showing thumbnail id.
New attributes in <images> tag:
showText: specifies how to show thumbnail text.
extraVSpace: for setting extra vertical space below text (vertical mode) 2.10:
Fixed bug when mouseAlpha="1" and thumbnail did not have any text. 2.09:
Modified alpha handling for thumbnail texts (Adobe - grrr!). 2.08:
Added "frameWidth" and "frameColor" attributes in <images> tag to make thumbnail frame appearance more customizable. 2.07:
Added "textOnTop" and "textVSpace" attributes in <images> tag to make thumbnail text more visible at mouse-over.
Added optional "id" attribute in <image> tag for reference in "imgSelected=xxx" command. 2.06:
Fixed a bug so you can now leave out the thumbnail text.
Added a space after the last thumbnail. 2.05:
It is now possible to rebuild the menu from a new XML file with the command: "external.picmenu.xmlfile=...". 2.01:
Fixed a bug when reading thumbnail size from XML file 2.0:
Plugin is now controlled by its own xml file.
OnOver and OnOut events added to each thumbnail. 1.25:
Somewhere along the line the possibility to escape code the image command must have disappeared. This has been corrected.
Handcursor is now used over the images. 1.24:
Parameter "showAtStart" added to make it possible to show the menu expanded at startup, even if parameter "menuHide" is set to "manual" or "auto". 1.23:
Width or height can be expressed as a negative number (example: size=140:-30), which will set the menu size to pano size minus that number. So, when the pano is resized - the menu will also be resized. 1.22:
Modified plugin init code so images don't have to be reloaded when menu is redrawn. 1.21:
Modified scrollbar code for smoother scrolling.
Disables scrolling when all thumbnails are visible.
Fixed scrollbar bug when redrawing menu. 1.20:
Fixed choiceFont bug 1.19:
This code should have been in the 1.18 version, but unfortunately a code mixup happened 1.18:
New parameter "scrollbar" makes it possible to hide the scrollbar.
New parameter "choicefield" makes it possible to hide the name field with the chosen thumbnail.
New parameters "expand" and "collapse" complement the "visible" paramter.
Parameter "size" can now be expressed in percentage of pano size. It is now also supported as a dynamic parameter, which means it can be set at any time.
Parameter "menuBgColor" defaultd to "not visible".
Parameter "menuFrameColor" defaultd to "not visible".
Menu onOver scroll limits and speed modified. 1.17:
The "imgSelected=nn" parameter can now bed at any time.
A delay has been added: After clicking an image, further clicks are discarded for 3 seconds (default - to, set parameter "clickDelay=n.n" seconds). 1.15:
Thumbnail mouseOver effects added.
MouseOver scrolling at menu endpoints modified. 1.11:
Parameter "visible" added. 1.10:
Thumbnail texts can span over several lines.
