Toggle Hotspots alpha/visibility in HTML5

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
sigurd.eliassen
Posts: 22
Joined: Mon Oct 06, 2014 2:16 pm

Toggle Hotspots alpha/visibility in HTML5

Post by sigurd.eliassen » Tue Oct 07, 2014 8:35 am

Hello,

I'm trying to create a "Toggle hotspot on/off" button to clean up the interface. The Mouse Click --> Toggle element visibility --> _preferred object_ (or toggle element alpha) action works fine on images, rectangles etc, but NOT on hotspots when exporting to HTML5. However, it works fine in Flash. I've also tried to access the text and icon/image chidren of the hotspot. No luck.

Am I doing something wrong, or is this a bug? I've seen examples of this functionality before. I've added an example project with work files + flash and html5 export. I'm working on an internal work project, so I can't post real panoramas on the forum.

Appreciate any help.

Sigurd.
Attachments
ForumExample.rar
(470.2 KiB) Downloaded 130 times

User avatar
Chu
Posts: 89
Joined: Tue Jan 10, 2012 1:59 pm
Location: London, UK
Contact:

Re: Toggle Hotspots alpha/visibility in HTML5

Post by Chu » Wed Oct 08, 2014 12:42 pm

Hi Sigurd,
I would recommend using Set Element Scale, not Toggle Visibility. You would create two buttons which are in the same position, one to show (set scales of hotspots to 1/1) and another to hide (set scale to 0/0). Obviously each button would set its own scale to 0/0 and set scale of the other button' to 1/1.

I create hotspots with unique prefixes, so I can target them with wildcard actions:

Code: Select all

#hs.*
This would target all hotspots that begin with 'hs'

Hope this helps
Using:
Pano2VR PRO 6.1.0 pro 64bit
build 17841/5.12.2

fancybox v3.2.5
Windows 10 v1709
Human Brain v1.0

Image

Artwork
  • Aerosol
  • Design
  • Screen
Specialist
  • 360°
  • Stereoscopy
  • Illusions
Concept
  • Consultancy
  • Campaigns
  • Data
  • Education
est.1971

User avatar
Hopki
Gnome
Posts: 9786
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Re: Toggle Hotspots alpha/visibility in HTML5

Post by Hopki » Wed Oct 08, 2014 4:55 pm

Hi,
If addressing Hotspots or their images you need to place either a % or a # in front of the target.
Example:
Mouse Click => Toggle Element Alpha => Alpha: 0.2 => Target: %hs_std

This is because there is many instances of hs_std that will appear in all panoramas.
Also if you have 6 rectangles all with the same ID, rectangle_01 and you want to hide and show all of them you would need, Target: %rectangle_01 otherwise only the first rectangle in the file tree will hide and show.

Regards,
Hopki

sigurd.eliassen
Posts: 22
Joined: Mon Oct 06, 2014 2:16 pm

Re: Toggle Hotspots alpha/visibility in HTML5

Post by sigurd.eliassen » Mon Oct 13, 2014 7:29 am

Thank you both for your response. Hopki: The "#" worked exactly as intended. Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests