Thanx Zephyr for looking, but for now the navigation menu, hotspots etc... are not really a problem.
What you recommends is already what I've done (just copying Klaus exemple)
2 players
|
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
|
<script>
// <![CDATA[
embedpano({swf:"../krpano/krpano.swf", id:"krpanoSWFObject1", xml:"split_day.xml", target:"krpanoDIV1"});
embedpano({swf:"../krpano/krpano.swf", id:"krpanoSWFObject2", xml:"split_night.xml", target:"krpanoDIV2"});
function sync_1to2()
{
var krpano1 = document.getElementById("krpanoSWFObject1");
var krpano2 = document.getElementById("krpanoSWFObject2");
krpano2.set("syncother", false);
krpano2.set("view.hlookat", krpano1.get("view.hlookat"));
krpano2.set("view.vlookat", krpano1.get("view.vlookat"));
krpano2.set("view.fov", krpano1.get("view.fov"));
}
function sync_2to1()
{
var krpano1 = document.getElementById("krpanoSWFObject1");
var krpano2 = document.getElementById("krpanoSWFObject2");
krpano1.set("syncother", false);
krpano1.set("view.hlookat", krpano2.get("view.hlookat"));
krpano1.set("view.vlookat", krpano2.get("view.vlookat"));
krpano1.set("view.fov", krpano2.get("view.fov"));
}
// ]]>
</script>
|
On view change event in the first xml
|
Source code
|
1
|
<events onmousedown="set(syncother,true); events.onviewchange();" onmousewheel="events.onmousedown();" onviewchange="if(syncother, js( sync_1to2() ) );"/>
|
On view change event in the second xml
|
Source code
|
1
|
<events onmousedown="set(syncother,true); events.onviewchange();" onmousewheel="events.onmousedown();" onviewchange="if(syncother, js( sync_2to1() ) );"/>
|
All this works perfect for the desktop version, the 2 panos are well synchronised and aligned :
It's well synchronised on the ipad too except it's not a split screen but a dual screen:
I guess the problem comes from the <area/> tag wich is not supported by the js player ? :
<area x="0%" width="200%"/> in the first xml
<area x="-100%" width="200%"/> in the second xml
I was thinking re-writing the js fot the ipad version like this (it's only an idea) :
|
Source code
|
1
|
krpano2.set("view.hlookat", krpano1.get("view.hlookat")+45
|
but i'm really not sure on how to write this with the correct syntax and if it would work (depending on ipad orientation...)
If anyone has a brilliant idea ?
Thanx !