You are not logged in.

vasin

Trainee

  • "vasin" started this thread

Posts: 92

Location: bangkok

Occupation: photographer

  • Send private message

1

Thursday, July 4th 2019, 10:55am

Open image hotspot displaying same image from 2 different hotspot

There are 2 open image hotspot. to open 2 different images but somehow it is opening only one. Even when it is link differently.
Please let me know what it's wrong? Thank you.

https://at-bangkok.com/virtualtours/Alti…-Tha-Pra/1.html


Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<hotspot name="spot2" url="fyi.png" onloaded="do_crop_animation(64,64, 60);" ath="-140" atv="10" onclick="action(open,openimage);" tooltip="open closet2" />
<plugin name="openimage"
url="2.jpg"
align="center" x="10" y="10"
scale="0.6" 
alpha="0"
visible="false"
onclick="action(close,get(name));"
/>

<action name="open">
set(plugin[%1].visible,true);
tween(plugin[%1].alpha,1);
</action>

<action name="close">
tween(plugin[%1].alpha,0,0.5,default, set(plugin[%1].visible,false) );
</action>

<hotspot name="spot3" url="fyi2.png" onloaded="do_crop_animation(64,64, 60);" ath="-205" atv="10" onclick="action(open,openimage);" tooltip="open closet3" />

<plugin name="openimage"
url="1.jpg"
align="center" x="10" y="10"
scale="0.6" 
alpha="0"
visible="false"
onclick="action(close,get(name));"
/>

<action name="open">
set(plugin[%1].visible,true);
tween(plugin[%1].alpha,1);
</action>

<action name="close">
tween(plugin[%1].alpha,0,0.5,default, set(plugin[%1].visible,false) );
</action>

2

Thursday, July 4th 2019, 11:27am

You have two layers with the same name "openimage", make different

Source code

1
2
3
4
5
6
7
<hotspot name="spot2" url="fyi.png" onloaded="do_crop_animation(64,64, 60);" ath="-140" atv="10" onclick="open(openimage1);" tooltip="open closet2" />
<plugin name="openimage1"url="2.jpg"align="center" x="10" y="10"scale="0.6" alpha="0"visible="false"onclick="close(get(name));"/>

<hotspot name="spot3" url="fyi2.png" onloaded="do_crop_animation(64,64, 60);" ath="-205" atv="10" onclick="open(openimage2);" tooltip="open closet3" />
<plugin name="openimage2"url="1.jpg"align="center" x="10" y="10"scale="0.6" alpha="0"visible="false"onclick="close(get(name));"/>
<action name="open">set(plugin[%1].visible,true);tween(plugin[%1].alpha,1);</action>
<action name="close">tween(plugin[%1].alpha,0,0.5,default, set(plugin[%1].visible,false) );</action>

vasin

Trainee

  • "vasin" started this thread

Posts: 92

Location: bangkok

Occupation: photographer

  • Send private message

3

Thursday, July 4th 2019, 1:07pm

San7
Thank you man!
You're the best!