picshow.swf
FPP hotspot plugin for showing one or several images in a window. Zooming and panning is supported.
The following hotspot parameter is supported in the FPP xml file:
In plugin external xml file, the following tags and attributes are supported:
In the plugin hotspot image attribute the following values are supported:
Example plugin external xml file:
NOTES: All tag names must be written in lower case, but attribute names are case independent (bgColor is equal to bgcolor). The size of the image window is set in your hotspot with the width="nnn" and height="nnn" attributes. The plugin is monitoring the hotspot image="..." attribute for a command or a picture id. Setting this to a new picture id will make the plugin show the corresponding picture. If no picture with that id is found, the plugin will look for an already loaded picture with a matching url. And if that is not found, it will finally try to load a picture with that url. If you want your pictures to be loaded in advance, with no delay when you want to show them, then add them to the xml file. Otherwise, just write the url in the image="..." attribute, and it will be loaded on the fly and displayed. External zoom controls can be ordinary hotspots with the onPress and onRelease events set:
Version history:
xmlfile | xmlFile=picshow.xml | plugin control XML file |
In plugin external xml file, the following tags and attributes are supported:
In <picshow> tag: | ||
borderColor | borderColor="#000000" | color of image border |
borderWidth | borderWidth="2" | width of image border |
borderStyle | borderStyle="simple" | border style: "none", "simple" or "shadow", default is "simple" |
bgColor | bgColor="#FFFFF0" | window background color |
shadow | shadow="1" | whether window should have a drop shadow (default: 0) |
close | close="collapse" | close behaviour: collapse or hide (default: hide) |
onClose | onClose="pano.pan=100,3000" | FPP command to be executed when closing picture |
showControls | showControls="0" | turns the zoom control buttons on/off, default is "1" |
In <picture> tag: | ||
id | id="P1" | picture id |
text | text="This is the image text" | text to show in text bar below the picture |
url | url="images/pic1.jpg" | picture file url |
In the plugin hotspot image attribute the following values are supported:
zoomin | start zooming in |
zoomout | start zooming out |
zoomstop | stop zooming |
panleft | start panning left |
panright | start panning right |
panup | start panning up |
pandown | start panning down |
panstop | stop panning |
reset | rescale image to fit window |
+ | show next image |
- | show previous image |
all other values - see below under NOTES |
Example plugin external xml file:
<?xml version = '1.0'?> <picshow bordercolor="#909090" bgcolor="#80A0C0" close="collapse" shadow="1"> <picture id="P1" text="If your image text is too long, I will truncate it" url="images/pic1.jpg" /> <picture id="P2" text="The old wooden bridge" url="images/pic2.jpg" /> <picture id="P3" text="A fantastic image of the Saturn moon Hyperion" url="images/hyperion.jpg" /> </picshow>
NOTES: All tag names must be written in lower case, but attribute names are case independent (bgColor is equal to bgcolor). The size of the image window is set in your hotspot with the width="nnn" and height="nnn" attributes. The plugin is monitoring the hotspot image="..." attribute for a command or a picture id. Setting this to a new picture id will make the plugin show the corresponding picture. If no picture with that id is found, the plugin will look for an already loaded picture with a matching url. And if that is not found, it will finally try to load a picture with that url. If you want your pictures to be loaded in advance, with no delay when you want to show them, then add them to the xml file. Otherwise, just write the url in the image="..." attribute, and it will be loaded on the fly and displayed. External zoom controls can be ordinary hotspots with the onPress and onRelease events set:
<spot id="zoom_in" url="../textbox.swf" static="1" align="TL" salign="TC" staticX="210" staticY="20" alpha="1.0" mouseChildren="0" visible="1" width="75" leftmargin="5" textalign="center" wordwrap="1" font="Verdana" size="12" color="#000000" bold="0" bgcolor="#AAAAFF" bordercolor="#000000" onPress="pictureC.image=zoomin" onRelease="pictureC.image=zoomstop" text="Zoom in" /> <spot id="zoom_out" url="../textbox.swf" static="1" align="TL" salign="TC" staticX="210" staticY="45" alpha="1.0" mouseChildren="0" visible="1" width="75" leftmargin="5" textalign="center" wordwrap="1" font="Verdana" size="12" color="#000000" bold="0" bgcolor="#AAAAFF" bordercolor="#000000" onPress="pictureC.image=zoomout" onRelease="pictureC.image=zoomstop" text="Zoom out" />
Version history:
1.4:
Improved image drag function:
- image dragging continues when mouse leaves image until mouse button is released
- when dragging, mouse pointer is locked in image until mouse button is released. 1.3:
Fixed bug when loading new image. 1.2:
Support for panning and zooming of image from external hotspots. 1.1:
"showControls" attribute added for choosing whether the zoom control buttons should be visible or not. 1.0.4:
"onClose" attribute added for specifying FPP command to be executed when closing image. 1.0.3:
Added possibility to flip back and forth between images by setting the hotspot "image" attribute to "+" or "-". 1.0.2:
Value "none" in "borderStyle" attribute supported. 1.0.1:
"borderStyle" attribute supported, "simple" or "shadow", default is "simple".
Improved image drag function:
- image dragging continues when mouse leaves image until mouse button is released
- when dragging, mouse pointer is locked in image until mouse button is released. 1.3:
Fixed bug when loading new image. 1.2:
Support for panning and zooming of image from external hotspots. 1.1:
"showControls" attribute added for choosing whether the zoom control buttons should be visible or not. 1.0.4:
"onClose" attribute added for specifying FPP command to be executed when closing image. 1.0.3:
Added possibility to flip back and forth between images by setting the hotspot "image" attribute to "+" or "-". 1.0.2:
Value "none" in "borderStyle" attribute supported. 1.0.1:
"borderStyle" attribute supported, "simple" or "shadow", default is "simple".