[SOLVED] Toggle textbox visibility with hotspot

Q&A about the latest versions
Post Reply
User avatar
Hrvoje
Posts: 173
Joined: Sat Feb 28, 2009 7:34 pm
Location: Zagreb, Croatia
Contact:

Hello

Question 1
Is it possible to use hotspots system to toggle textbox visibility by using textbox id in hotspot url parameter?
I'm need to create educational tour with 15-20 panoramas, they are linked by using new Tour editor,
which is btw. great addition to P2vr
Each panorama will also have 3-5 spots, when clicked it should open info (photo + text) about particular spot.
After searching forums, I came to conclusion that best option for displaying spot info is iframe with external html in textbox.
I tried this approach:
- In template editor I duplicated default hotspot and renamed it into hotspot2
- for duplicated hotspot I changed Action from "Open next panorama" into "Toggle Element Visibility" and as target I added "$hu"
- I created texfield and named (ID) it: "text1". Texfield contains iframe code to load external html.

In hotspot editor I created new hotspot with "hotspot2" Skin-ID. As url I added "text1".
I hoped that clicking this hotspot would toggle visibility for "text1" texfield, but its not working.
If in template editor, for hotspot2 I change target for "Toggle Visibility" action into "text2" - it's working OK

So I wonder, is there any other option to control template items visibility, by using standard Hotspots editor?

- If possible, I would like to avoid to create 50ish hotspots in template with hardcoded targets.
- Also, It would be great if I could use only one textfield as iframe holder, and to only pass html file name into iframe by clicking particular hotspot. So code in texfield would look like:
<iframe width="300" height="300" src="somepath/$htmlurl" frameborder="0"></iframe>
And then to use HotSpot system create hotspot with this as URL: $TemplateObjectName=text1&$htmlurl=someurl.html


If you have any suggestion how to accomplish above, I will be very grateful :D


Question 2
How to change HTML5 output so that drag mode 2 is set by default?

Question 3
Any approx ETA on transition effect with HTML5?


Thanks,
Regards

I'm using 4.1 pro
Last edited by Hrvoje on Sat Mar 30, 2013 11:27 am, edited 2 times in total.
User avatar
Hrvoje
Posts: 173
Joined: Sat Feb 28, 2009 7:34 pm
Location: Zagreb, Croatia
Contact:

Hi

After spending some more time with p2vr, forum and tutorials, I've found suitable solution:

My project is sized: 800x600 (later I will play with percentage sizes)

1. for external html files I created: somename1.html, somename2.html, etc. each holds css, image and text.
2. In panorama template i created
- container named "html_container", visible: no, 800x600px
- rectangle named "html_background": visible: no, 800x600px, alpha:0.8,
action: Mouse Click: Hide element, Target: "html_container"
- textfield named "html_loader", size: 600x400px, X:100, Y:100
- nice X png button named "button_close"
action: Mouse Click: Hide element, Target: "html_container", and Mose hover and leave for $self alpha
- hotspot named "hotspot2", actions:
Mouse Click: Show element, Target: "html_container"
Mouse Click: Set Text, Text: $hu, Target: "html_loader"
and standard mouse hover actions for show and hide info text

3. When creating hotspots for opening html, In hotspot editor:
- double click to add hotspot in desired location
- Skin-ID: hotspot2
- Title: Some info text
- URL: <iframe width="600" height="400" src="html/somename1.html" frameborder="0"></iframe>
Url data passes iframe info into html_loader textfield

Now I need only one skin element group for html showing shotspots and one group for html display :D


Hopki, thanks for providing useful example in this thread :D



Questions 2 and 3 still remains to be answered :D


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

Hi,
Question 2
How to change HTML5 output so that drag mode 2 is set by default?
You will find this in the Advanced Settings tab Mouse - Invert control.
Question 3
Any approx ETA on transition effect with HTML5?
Keep an eye on the roadmap: http://gardengnomesoftware.com/bt/roadmap_page.php
Issue #218
Regards,
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
User avatar
Hrvoje
Posts: 173
Joined: Sat Feb 28, 2009 7:34 pm
Location: Zagreb, Croatia
Contact:

Hi

Yeah, I've figured it out few days ago. It was in a front of me whole time :D

Thanks
Post Reply