Hotspot with preview
Posted: Thu Aug 01, 2013 4:14 pm
HI,
Been asked about how you would go about adding a preview image to your hotspots.
Attached is a simple project which does just that.
Download and unzip.
Make sure you enter a user data title as the project is looking for this for its file names. This project already has then set.
The Project File (p2vr)
I have set a remap to make the preview images, the output file path is output/preview/$ut.jpg.
This will produce the images with the file names that the skin will be looking for as $ut is the user data Title.
This will produce a folder in the output folder called preview and inside will be images with the user data titles with the file extension .jpg.
The reason for doing this way is that you can have as many preview images in one panorama as is required.
The Skin:
It is using the Simplex hotspot template with the addition of two rectangles and an external loader.
The rectangle with the ID preview is the background and is set to not visible.
The next rectangle with the ID drop is acting like a drop shadow for the preview image.
The external loader which has the ID of preview_image will show the image.
Each is a child of the other to keep everything simple in terms of showing and hiding.
The hotspot template has the additional actions:
Mouse Enter => Set Text => Text: preview/$hs.jpg => Target: preview_image
Mouse Enter => Show Element => Target: preview
Mouse Leave => Set Text => Text: (leave blank) => Target: preview_image
Mouse Leave => Hide Element => Target: preview
The trick is to set the user data title before you out anything.
Regards,
Hopki
Been asked about how you would go about adding a preview image to your hotspots.
Attached is a simple project which does just that.
Download and unzip.
Make sure you enter a user data title as the project is looking for this for its file names. This project already has then set.
The Project File (p2vr)
I have set a remap to make the preview images, the output file path is output/preview/$ut.jpg.
This will produce the images with the file names that the skin will be looking for as $ut is the user data Title.
This will produce a folder in the output folder called preview and inside will be images with the user data titles with the file extension .jpg.
The reason for doing this way is that you can have as many preview images in one panorama as is required.
The Skin:
It is using the Simplex hotspot template with the addition of two rectangles and an external loader.
The rectangle with the ID preview is the background and is set to not visible.
The next rectangle with the ID drop is acting like a drop shadow for the preview image.
The external loader which has the ID of preview_image will show the image.
Each is a child of the other to keep everything simple in terms of showing and hiding.
The hotspot template has the additional actions:
Mouse Enter => Set Text => Text: preview/$hs.jpg => Target: preview_image
Mouse Enter => Show Element => Target: preview
Mouse Leave => Set Text => Text: (leave blank) => Target: preview_image
Mouse Leave => Hide Element => Target: preview
The trick is to set the user data title before you out anything.
Regards,
Hopki