You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Phil

Trainee

  • "Phil" started this thread

Posts: 97

Location: Texas

  • Send private message

1

Tuesday, August 6th 2013, 6:47am

Example with variables

Can someone show me an example with hotspot variables for ath, atv and scale? I'm not finding anything in the documentation or examples that put this together.

This is the idea and example I'm trying to get to work.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
<krpano version="1.16" onstart="">

<preview type="grid(cube,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" details="16" />

<!-- variables --> 
hs1_ath="0"
hs1_atv="0"
hs1_scale="0.8"

<!-- hotspot using variables --> 
<hotspot name="hs1" url="img.png" width="100" height="100" zoom="true" visible="true" ath="hs1_ath" atv="hs1_atv" scale="hs1_scale"/>

</krpano>


Thanks,
Phil

spacerywirtualne

Professional

Posts: 937

Location: Poland, Europe

Occupation: krpano developer : virtual tours

  • Send private message

2

Tuesday, August 6th 2013, 8:35am

There are many methods. Here is one of This is one of the simplest.


Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<krpano version="1.16" onstart="set_var()">

<preview type="grid(cube,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" details="16" />

<action name="set_var">
  set(hs1_ath,0);
  set(hs1_atv,0);
  set(hs1_scale,0.8);
</action>

<hotspot name="hs1" url="img.png" width="100" height="100" zoom="true" visible="true" onloaded="copy(ath,hs1_ath);copy(atv,hs1_atv);copy(scale,hs1_scale);"/>

<!-- variables 
hs1_ath="0"
hs1_atv="0"
hs1_scale="0.8"
--> 
<!-- hotspot using variables 
<hotspot name="hs1" url="img.png" width="100" height="100" zoom="true" visible="true" ath="hs1_ath" atv="hs1_atv" scale="hs1_scale"/>
--> 
</krpano>


regards Piotr
Your own online, cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube

cms4vr team *thumbsup*

Phil

Trainee

  • "Phil" started this thread

Posts: 97

Location: Texas

  • Send private message

3

Tuesday, August 6th 2013, 3:59pm

Piot,

Thank you for that example! It's exactly what I needed. I was close on a few of my attempts finding many ways not to do it.

Phil

spacerywirtualne

Professional

Posts: 937

Location: Poland, Europe

Occupation: krpano developer : virtual tours

  • Send private message

4

Tuesday, August 6th 2013, 5:29pm

*thumbup*

regards

Piotr
Your own online, cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube

cms4vr team *thumbsup*