I have no experience in adding hotspots by using javascript.
I had no problems with zorder property (Flash and HTML5).
Set dynamically zorder order by using variable.
|
Quellcode
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<krpano inc_hs="10">
<style name="stylename" url="..." width="" height="..." />
<action name="load_hotspots">
addHs(test1,stylename,0,0);
addHs(test2,stylename,10,0);
addHs(test3,stylename,20,0);
</action>
<action name="addHs">
addhotspot(%1);
hotspot[%1].loadstyle(%2);
copy(hotspot[%1].zorder, inc_hs);
set(hotspot[%1].ath, %3);
set(hotspot[%1].atv, %4);
inc(inc_hs);
</action>
</krpano>
|
In javascript this would probably like this:
|
Quellcode
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<script>
// <![CDATA[
function addHs(a,b,c,d)
{
var krpano = document.getElementById("krpanoObject");
var inc_hs = krpano.get('inc_hs');
krpano.call("addHs("+a+","+b+","+c+","+d+","+inc_hs+");");
}
addHs(test1,stylename,0,0);
addHs(test2,stylename,20,0);
// ]]>
</script>
|
but as I wrote I have no experience in javascreept...
Piotr