Image-stitching and virtual tour solutions My account Updates
It is currently Tue Sep 02, 2014 12:37 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Help on coding a Hotspot
PostPosted: Sat Nov 20, 2010 2:25 am 
Offline
Member

Joined: Thu Feb 23, 2006 2:55 pm
Posts: 157
Location: Italy - Roma
This is the code generated by PTP:

Code:
    <!--************** Hotspots and lensflares ***************************************************-->
    <hotspot name="spot1" onclick="action(closeglobalobjects);action(closeallobjects);set(plugin[spot1object].visible,true);tween(plugin[spot1object].alpha, 1);" bordercolorhover="0xffffffff" borderalphahover="0.501961" fillcolorhover="0xffffffff" fillalphahover="0.25098">
        <point ath="402.367" atv="-3.9668"/>
        <point ath="419.457" atv="-5.07286"/>
        <point ath="419.252" atv="9.23766"/>
        <point ath="402.204" atv="7.16097"/>
    </hotspot>
    <plugin name="spot1object" visible="false" url="indexdata/graphics/spots/object0.png" align="center" alpha="0" onclick="action(closeglobalobjects);tween(alpha, 0);delayedcall(0.5,set(visible,false));" width="600" height="prop"/>
    <hotspot name="spot2" onclick="action(closeglobalobjects);action(closeallobjects);set(plugin[spot2object].visible,true);tween(plugin[spot2object].alpha, 1);" url="indexdata/graphics/spots/spot0.png" onhover="showtext(Zoom);" ath="419.163" atv="9.21974"/>
    <plugin name="spot2object" visible="false" url="indexdata/graphics/spots/object0.png" align="center" alpha="0" onclick="action(closeglobalobjects);tween(alpha, 0);delayedcall(0.5,set(visible,false));" width="600" height="prop" onhover="showtext(Zoom);"/>
    <!-- close all hotspots -->
    <action name="closeallobjects">set(plugin[spot1object].alpha, 0);set(plugin[spot1object].visible,false);set(plugin[spot2object].alpha, 0);set(plugin[spot2object].visible,false);</action>

What I need is the area hotspot (spot1) to appear on over/hover the image hotspot (spot2)
and to open the linked image (object0.png) only clicking on spot2 (that is, spot1 inactive as a link but active to show the area interested).
Attached an image.

I think I need the "parent tag": I tried but maybe I'm doing something wrong.

Also I'd like the image (object0.png) to open on a dark transparent background and the possibility to add a title (up) and a text description (down)

I'm starting to understand how krpano works but, you know, a full krpano GUI would help a lot, even a buggy one. :)

Thanks in advance for your help.
Marco




Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 20, 2010 10:40 am 
Offline
Member

Joined: Wed Nov 14, 2007 2:12 pm
Posts: 13858
Location: Isleham, Cambridgeshire, UK.
marco.lanciani wrote:
What I need is the area hotspot (spot1) to appear on over/hover the image hotspot (spot2)
and to open the linked image (object0.png) only clicking on spot2 (that is, spot1 inactive as a link but active to show the area interested).

I think I need the "parent tag": I tried but maybe I'm doing something wrong.

I guess I don't really understand what effect you are trying to achieve because I don't understand why you need to use two hotspots.

On the face of it it would appear that you could do this with a single polygon hotspot.

Quote:
Also I'd like the image (object0.png) to open on a dark transparent background and the possibility to add a title (up) and a text description (down)

So just make the transparent background and title and descriptive text part of the PNG image.

See screenshot sequence.









_________________
Andrew Stephens
Nikon D40, Nikkor 10.5mm fisheye, Sigma 8mm f3.5 fisheye, Nikkor 18-55/50/35mm lenses, Nodal Ninja 5 Lite, Nodal Ninja 4 with R-D16, Agno's MrotatorTCS short.
Nikon P5100, CP5000, CP995, FC-E8, WC-E63,WC-E68, TC-E2, Kaidan Kiwi 995, Bophoto pano bracket, Agno's MrotatorA.
Merlin/Orion robotic pano head + Papywizard on Nokia 770/N800/N810 and Windows 8/XP/2K.


Last edited by mediavets on Sat Nov 20, 2010 11:04 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 20, 2010 1:18 pm 
Offline
Member

Joined: Thu Feb 23, 2006 2:55 pm
Posts: 157
Location: Italy - Roma
Actually I need only one hotspot. I created 2 hotspots just to try to merge the code.
This is the effect I'm looking for:
to highlight the area (the shape) of the linked object when moving the mouse on the loop image. Then open the image clicking either on the small loop image or the area highlighted.
I hope you understand now.

As for the text, that's a solution but I'd like to do the same by coding, that is, using the "textfield" plugin or something like the Highslide JS, which is not included in krpano/PTP.
Regards,
Marco


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 20, 2010 1:58 pm 
Offline
Member

Joined: Wed Nov 14, 2007 2:12 pm
Posts: 13858
Location: Isleham, Cambridgeshire, UK.
marco.lanciani wrote:
Actually I need only one hotspot. I created 2 hotspots just to try to merge the code.
This is the effect I'm looking for:
to highlight the area (the shape) of the linked object when moving the mouse on the loop image. Then open the image clicking either on the small loop image or the area highlighted.
I hope you understand now.

I think I may understand now.

I found a way that I think gets close to the effect you want.

First place a Point hotspot with your loop image as the Display Object (I've used a regular theme icon in this demo, but you can instead choose a custom graphic).

Then place a Polygon hotspot over the top of the Point hotspot which links to your 'pop-up' image.

That way your object's outline will be displayed when the viewer rolls overs the loop image (and a larger area than that of course) and clicking will display the 'pop-up' image.

Is that good enough?

Quote:
As for the text, that's a solution but I'd like to do the same by coding, that is, using the "textfield" plugin or something like the Highslide JS, which is not included in krpano/PTP.
Regards,
Marco

I don't think you can get that effect using the "textfield" plug-in.











_________________
Andrew Stephens
Nikon D40, Nikkor 10.5mm fisheye, Sigma 8mm f3.5 fisheye, Nikkor 18-55/50/35mm lenses, Nodal Ninja 5 Lite, Nodal Ninja 4 with R-D16, Agno's MrotatorTCS short.
Nikon P5100, CP5000, CP995, FC-E8, WC-E63,WC-E68, TC-E2, Kaidan Kiwi 995, Bophoto pano bracket, Agno's MrotatorA.
Merlin/Orion robotic pano head + Papywizard on Nokia 770/N800/N810 and Windows 8/XP/2K.


Last edited by mediavets on Sat Nov 20, 2010 2:28 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 21, 2010 2:29 pm 
Offline
Member

Joined: Wed Nov 14, 2007 2:12 pm
Posts: 13858
Location: Isleham, Cambridgeshire, UK.
Marco,

What did you think of my suggested 'solution'?

_________________
Andrew Stephens
Nikon D40, Nikkor 10.5mm fisheye, Sigma 8mm f3.5 fisheye, Nikkor 18-55/50/35mm lenses, Nodal Ninja 5 Lite, Nodal Ninja 4 with R-D16, Agno's MrotatorTCS short.
Nikon P5100, CP5000, CP995, FC-E8, WC-E63,WC-E68, TC-E2, Kaidan Kiwi 995, Bophoto pano bracket, Agno's MrotatorA.
Merlin/Orion robotic pano head + Papywizard on Nokia 770/N800/N810 and Windows 8/XP/2K.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 21, 2010 3:12 pm 
Offline
Member

Joined: Thu Feb 23, 2006 2:55 pm
Posts: 157
Location: Italy - Roma
Hi Andrew,

sorry to be so late on answering and, yes, your solution is good. :)

Marco


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group