Home -> FPP plugins page -> spotmenu.swf
This plugin is completely free for use in any context or connection.
spotmenu.swf
FPP hotspot plugin for displaying a scrollable menu box.
Each menu item can have an icon and OnClick, OnOver and OnOut events.
You can have as many menus as you like in your pano.
The plugin reads configuration data from an external XML file.
Plugin parameters are read from an external xml file with the default name "spotmenu.xml". If you want to use a different name, use the xmlFile="..." attribute. And whenever this attribute is changed, the plugin will load and build a new menu.

Example menu <spot>:

<spot id="menu3" url="../spotmenu.swf" static="1" salign="BC" align="BC" staticX="-100" staticY="-10" alpha="1" visible="1"
	mouseChildren="1" blockMouse="1" disableKeys="0" disableControls="0"
	onOver="pano.disableWheel=1; pano.disableKeys=1;" 
	onOut="pano.disableWheel=0; pano.disableKeys=0"
	xmlFile="menu23.xml"
/>



Tags and attributes used in plugin XML file:

In <spotmenu> tag:
sizesize="124:500"menu size, if not given menu will be autosized
bgColorbgColor="#CFCFC0"background color, default=no background
bgColor="#FFFFFF-#A0A0A0"background color gradient (top-bottom)
bgImagebgImage="img/menubg5.jpg"background image
borderColorborderColor="#000000"border color, default=no border
titletitle="My FPP menu"menu title, default=no title
itemSpaceitemSpace="5"extra vertical space between menu items, default=0
showAtStartshowAtStart="1"show menu at start, default=0
selectModeselectMode="3"menu item behaviour after being clicked: (see also under NOTES below)
1 = selected and not clickable (default)
2 = selected and clickable
3 = not selected and clickable
hideOnClickhideOnClick="0"hide menu after clicking item, default=1
hideStylehideStyle="fly,collapse"menu hiding style, supported values: "", "fly" or "collapse"
or combination, default=""



In <menuItems><item> childtag:
idid="p12"image id (optional), used as reference when using
the "click" or "select" parameters
texttext="Train Station"menu item text
text="-" will generate a menu separator
imageimage="img/train.png"menu item icon image
addspaceaddspace="20"additional space before menu item, default=0
onClickonClick="global.goPano2"menu item onClick command
onOveronOver="pic3.visible=1"menu item onOver command
onOutonOut="pic3.visible=0"menu item onOut command
selectedselected="1"menu item selected at start, default=0
enabledenabled="0"menu item enabled/disabled at start, default=1
headingheading="1"makes this item a non-selectable heading, default=0
subheadingsubheading="1"makes this item a non-selectable subheading, default=0



Use the <fonts> tag with its childtags to set the visual attributes for different menu objects or events:
In <fonts> tag:
 in <title> childtag:use to set menu title attributes
 in <heading> childtag:use to set menu heading attributes
 in <subheading> childtag:use to set menu subheading attributes
 in <item> childtag:use to set menu item attributes
 in <selected> childtag:use to set selected menu item attributes
 in <mouseOver> childtag:use to set mouse-over menu item attributes
 in <disabled> childtag:use to set disabled menu item attributes

Each of the childtags above supports the following styling attributes:
visiblevisible="0"show field with name of chosen thumbnail (default 1)
fontfont="Helvetica"menu item text font name
textSizetextSize="16"menu item text size
textColortextColor="#FFFFFF"menu item text color
bgColorbgColor="#F00000"menu item text background color
borderColorborderColor="#A0A0C0"menu item text border color
boldbold="1"menu item text bold attribute
italicitalic="1"menu item text italic attribute
underlineunderline="1"menu item text underline attribute



Menu commands can be executed from FPP by setting the hotspot action="..." attribute (example: action="select=M5").
The following actions are supported:

clickclick=M8simulate menu item click, onClick command will be executed
selectselect=M5set this menu item as selected, onClick command will NOT be executed
hidehide=T0 or 1, anything else will toggle menu state
showshow=Tas "hide" parameter, but inverted
enableenable=MI1enable menu item
disabledisable=MI1disable menu item
unselectunselectwill unselect any previously selected menu item
 
item_idL5=global.showPano5if action is not one of the above, it will be taken as the id of a menu item and set the onClick command for that item



NOTES:

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 selectMode="n" attribute controls what happens with a menu item after it has been clicked. If you want it to be selected and not clickable again, use selectMode="1" which is default. If you want it to be selected but clickable again use selectMode="2". And if you want it to be not selected and of course clickable again, use selectMode="3".

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.

Newline ("\n") codes can be used in the menu item text to make it span over more than one line.



Example of plugin xml file:

<?xml version = '1.0'?>
<spotmenu
   size="200:240"
   bgColor="#FFFFFF-#A0A0A0"
   borderColor="#FFFFFF"
   itemSpace="2"
   title="My FPP menu 5"
   showAtStart="1"
   hideOnClick="1"
   hideStyle="fly"
>
   <fonts>
      <title font="Trebuchet MS" textSize="16" textColor="#FFFFFF" bgColor="#000000" bold="1" />
      <item  font="Trebuchet MS" textSize="14" textColor="#000000" />
      <selected textColor="#000000" bgColor="#FFFFFF"  />
      <mouseOver textColor="#000000" bgColor="#A0A0A0" borderColor="#000000" bold="1" />
   </fonts>
   <menuItems>
      <item id="M1" text="City Hall Tower" image="img/camera2.png" onClick="global.showFake()" onOver="pic5s.visible=1" onOut="pic5s.visible=0" />
      <item id="M2" text="Maria Hill" image="img/camera1.png" onClick="global.showFake()" onOver="pic6s.visible=1" onOut="pic6s.visible=0" />
      <item text="-" />
      <item id="M3" text="%C5SS bridge" image="img/yacht2.png" onClick="global.showFake()" onOver="pic7s.visible=1" onOut="pic7s.visible=0" />
      <item id="M4" text="Where I work" image="img/work.png" onClick="global.showFake()" onOver="pic3s.visible=1" onOut="pic3s.visible=0" />
      <item id="M5" text="The Train Bridge" image="img/train.png" onClick="global.showFake()" onOver="pic2s.visible=1" onOut="pic2s.visible=0" selected="1" />
      <item text="-" />
      <item id="M6" text="My home" image="img/home.png" onClick="global.showFake()" onOver="pic1s.visible=1" onOut="pic1s.visible=0" />
      <item id="M7" text="The Yacht Club" image="img/yacht.png" onClick="global.showFake()" onOver="pic4s.visible=1" onOut="pic4s.visible=0" />
      <item text="-" />
      <item id="M8" text="City Hall Tower" image="img/camera2.png" onClick="global.showFake()" onOver="pic5s.visible=1" onOut="pic5s.visible=0" />
      <item id="M9" text="%C5SS bridge" image="img/yacht2.png" onClick="global.showFake()" onOver="pic7s.visible=1" onOut="pic7s.visible=0" />
      <item id="M10" text="Where I work" image="img/work.png" onClick="global.showFake()" onOver="pic3s.visible=1" onOut="pic3s.visible=0" />
      <item text="-" />
      <item id="M11" text="My home" image="img/home.png" onClick="global.showFake()" onOver="pic1s.visible=1" onOut="pic1s.visible=0" />
      <item id="M12" text="The Yacht Club" image="img/yacht.png" onClick="global.showFake()" onOver="pic4s.visible=1" onOut="pic4s.visible=0" />
   </menuItems>
</spotmenu>
						


Version history:

1.5:
It is now possible to make headings or subheadings clickable.

1.4:
Support for subheading items added.
Added "addspace" attribute to <item> tag.
Newline code ("\n") can be used in the menu item texts.

1.3.2:
Small fix to remove error msg when no menu scrollbar.

1.3.1:
Fixed bug with heading alpha.

1.3:
Added the action command "unselect" to unselect any previously selected menu item.
Added support for using headings in menu items list. Previously used "heading" is now "title".

1.2:
Added support for disabled menu items.
Added possibility to change menu item onClick command.

1.1.1:
Fixed bug when showAtStart="0".
Fixed bug when checking for new XML file.

1.1:
Added attribute selectMode="n" to control what happens with a menu item after it has been clicked.