You are not logged in.

1

Tuesday, May 30th 2017, 1:13pm

can not add hotspot at mouse clicked coordinates

i'm trying to add hotspot at mouse clicked coordinates.
i tried

Source code

1
2
3
4
5
6
7
8
9
  <action name="click1" >  showlog(true); 
addhotspot(newspot); 
screentosphere(mouse.x,mouse.y,toh, tov); 
 trace(toh);  trace(tov); 
 set(hotspot[newspot].url,q.mark.png); 
set(hotspot[newspot].ath,toh);
 set(hotspot[newspot].atv,tov); 
set(hotspot[newspot].onclick, removehotspot(newspot) ); 
</action>


it's not working for me.but if i replace toh and tov with values then it works perfectly.what could be the problem?? from logs toh and tov have correct values

This post has been edited 2 times, last edit by "sameer4" (May 30th 2017, 1:50pm)


spacerywirtualne

Professional

Posts: 1,117

Location: Poland, Europe

Occupation: krpano developer : virtual tours : the cms4vr owner

  • Send private message

2

Tuesday, May 30th 2017, 3:34pm

Hi

Try use COPY method like this:

Source code

1
2
3
set(hotspot[newspot].url,'q.mark.png'); 
copy(hotspot[newspot].ath,toh); 
copy(hotspot[newspot].atv,tov);


or:

Source code

1
2
set(hotspot[newspot].ath,get(toh));
set(hotspot[newspot].atv,get(tov));



it should work *thumbup*


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

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*