You are not logged in.

> The forum rules have been updated. Please take a moment to read them.


#1 2010-11-20 02:25:37

marco.lanciani
Member
From: Italy - Roma
Registered: 2006-02-23
Posts: 200
Website

Help on coding a Hotspot

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. smile

Thanks in advance for your help.
Marco


Uploaded Images

Offline

 

#2 2010-11-20 10:40:00

mediavets
Moderator
From: Isleham, Cambridgeshire, UK.
Registered: 2007-11-14
Posts: 9739
Website

Re: Help on coding a Hotspot

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.

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.


Uploaded Images

Last edited by mediavets (2010-11-20 11:04:40)


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.

Online

 

#3 2010-11-20 13:18:06

marco.lanciani
Member
From: Italy - Roma
Registered: 2006-02-23
Posts: 200
Website

Re: Help on coding a Hotspot

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

Offline

 

#4 2010-11-20 13:58:31

mediavets
Moderator
From: Isleham, Cambridgeshire, UK.
Registered: 2007-11-14
Posts: 9739
Website

Re: Help on coding a Hotspot

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?

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.


Uploaded Images

Last edited by mediavets (2010-11-20 14:28:09)


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.

Online

 

#5 2010-11-21 14:29:16

mediavets
Moderator
From: Isleham, Cambridgeshire, UK.
Registered: 2007-11-14
Posts: 9739
Website

Re: Help on coding a Hotspot

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.

Online

 

#6 2010-11-21 15:12:39

marco.lanciani
Member
From: Italy - Roma
Registered: 2006-02-23
Posts: 200
Website

Re: Help on coding a Hotspot

Hi Andrew,

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

Marco

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson