panomenu.swf
FPP external plugin for displaying a scrollable menu box.Each menu item can have icon, 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 "panomenu.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 a server side script.
Tags and attributes used in plugin XML file:
Example of 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.panomenu.salign=BL". Parameter and attribute names are not case sensitive ("bgcolor" is equal to "BGColor"). If a background image larger than the menu is used, it will be automatically masked. The "click=xxx" parameter can be used at any time to simulate an menu item click. The onClick command will be executed and the menu will be hidden if "hideOnClick" is set. The "select=xxx" parameter can also be used to select a menu item. But the onClick command will NOT be executed and the menu will NOT be automatically hidden. If the "id" attribute is not specified for menu items, the value of the "click" and "select" parameters will be matched against the menu item "text" attribute.
If you want to use a different filename you can add these lines to the FPP xml file:
<panomenu> xmlFile=myMenu.xml </panomenu>
Tags and attributes used in plugin XML file:
In <panomenu> tag: | ||
size | size="124:500" | menu size, if not given menu will be autosized |
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 |
bgColor | bgColor="#CFCFC0" | menu background color, default=no background |
borderColor | borderColor="#000000" | menu border color, default=no border |
heading | heading="My FPP menu" | menu heading, default=no heading |
itemSpace | itemSpace="5" | extra vertical space between menu items, default=0 |
showAtStart | showAtStart="1" | show menu at start, default=0 |
hideOnClick | hideOnClick="0" | hide menu after clicking item, default=1 |
hideStyle | hideStyle="fly,collapse" | menu hiding style, supported values: "", "fly" or "collapse" |
or combination, default="" | ||
bgImage | bgImage="img/menubg5.jpg" | menu background image |
In <fonts> tag: | ||
in <heading> childtag: | ||
in <item> childtag: | ||
in <selected> childtag: | ||
in <mouseOver> childtag: | ||
visible | visible="0" | show field with name of chosen thumbnail (default 1) |
font | font="Helvetica" | menu item text font name |
textSize | textSize="16" | menu item text size |
textColor | textColor="#FFFFFF" | menu item text color |
bgColor | bgColor="#F00000" | menu item text background color |
borderColor | borderColor="#A0A0C0" | menu item text border color |
bold | bold="1" | menu item text bold attribute |
italic | italic="1" | menu item text italic attribute |
underline | underline="1" | menu item text underline attribute |
In <menuItems><item> childtag: | ||
id | id="p12" | image id (optional), used as reference when using |
the "click" or "select" parameters | ||
text | text="Train Station" | menu item text |
text="-" will generate a menu separator | ||
image | image="img/train.png" | menu item icon image |
onClick | onClick="global.goPano2" | menu item onClick command |
onOver | onOver="pic3.visible=1" | menu item onOver command |
onOut | onOut="pic3.visible=0" | menu item onOut command |
selected | selected="1" | menu item selected at start |
The following parameters can be updated dynamically from FPP:
xmlFile | xmlFile=myMenu.xml | build new menu |
alpha | alpha=0.50 | menu transparency |
click | click=M8 | simulate menu item click, onClick command will be executed |
select | select=M5 | set this menu item as selected, onClick command will NOT be executed |
hide | hide=T | 0 or 1, anything else will toggle menu state |
show | show=T | as "hide" parameter, but inverted |
<?xml version = '1.0'?> <panomenu size="200:250" salign="ML" margin="0:-60" alpha="1" bgImage="img/menubg5.jpg" borderColor="#000000" heading="My FPP menu" itemSpace="2" showAtStart="1" hideOnClick="0" hideStyle="fly" > <fonts> <heading font="Helvetica" textSize="16" textColor="#FFFFFF" bgColor="#F00000" bold="1" /> <item id="M" font="Helvetica" textSize="14" textColor="#000000" /> <selected textColor="#FFFFFF" bgColor="#333333" /> <mouseOver bgColor="#F8F8FF" borderColor="#A0A0C0" bold="1" /> </fonts> <menuItems> <item id="M1" text="City Hall Tower" image="img/camera2.png" onClick="global.showPano1()" onOver="pic5s.visible=1" onOut="pic5s.visible=0" /> <item id="M2" text="Maria Hill" image="img/camera1.png" onClick="global.showPano2()" onOver="pic6s.visible=1" onOut="pic6s.visible=0" /> <item text="-" /> <item id="M3" text="%C5SS bridge" image="img/yacht2.png" onClick="global.showPano3()" onOver="pic7s.visible=1" onOut="pic7s.visible=0" /> <item id="M4" text="Where I work" image="img/work.png" onClick="global.showPano4()" onOver="pic3s.visible=1" onOut="pic3s.visible=0" /> <item id="M5" text="The Train Bridge" image="img/train.png" onClick="global.showPano5()" onOver="pic2s.visible=1" onOut="pic2s.visible=0" selected="1" /> <item text="-" /> <item id="M6" text="My home" image="img/home.png" onClick="global.showPano6()" onOver="pic1s.visible=1" onOut="pic1s.visible=0" /> <item id="M7" text="The Yacht Club" image="img/yacht.png" onClick="global.showPano7()" onOver="pic4s.visible=1" onOut="pic4s.visible=0" /> <item text="-" /> <item id="M8" text="City Hall Tower" image="img/camera2.png" onClick="global.showPano8()" onOver="pic5s.visible=1" onOut="pic5s.visible=0" /> <item id="M9" text="%C5SS bridge" image="img/yacht2.png" onClick="global.showPano9()" onOver="pic7s.visible=1" onOut="pic7s.visible=0" /> <item id="M10" text="Where I work" image="img/work.png" onClick="global.showPano10()" onOver="pic3s.visible=1" onOut="pic3s.visible=0" /> <item text="-" /> <item id="M11" text="My home" image="img/home.png" onClick="global.showPano11()" onOver="pic1s.visible=1" onOut="pic1s.visible=0" /> <item id="M12" text="The Yacht Club" image="img/yacht.png" onClick="global.showPano12()" onOver="pic4s.visible=1" onOut="pic4s.visible=0" /> </menuItems> </panomenu>
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.panomenu.salign=BL". Parameter and attribute names are not case sensitive ("bgcolor" is equal to "BGColor"). If a background image larger than the menu is used, it will be automatically masked. The "click=xxx" parameter can be used at any time to simulate an menu item click. The onClick command will be executed and the menu will be hidden if "hideOnClick" is set. The "select=xxx" parameter can also be used to select a menu item. But the onClick command will NOT be executed and the menu will NOT be automatically hidden. If the "id" attribute is not specified for menu items, the value of the "click" and "select" parameters will be matched against the menu item "text" attribute.