You can also set up your tour with different before/after pairs.
For instance, I have a tour with 3 scenes, each with their own before/after panoramas.
Just use multiple XML files to load each pair as needed. My coding follows the slider example but with a few modifications.
Here's the tour: YMCA Before & After
Main xml's relevant code
|
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
|
<action name="start">
showtext('[b][i]krpano[br]xml slider / blending cubes example[/i][/b]', infostyle);
addcube(pano1);
addcube(pano2);
setblend(0);
</action>
<action name="setblend" devices="flash">
sub(blend2, 1.0, %1);
setcubealpha(pano1, %1);
setcubealpha(pano2, get(blend2));
</action>
<action name="setblend" devices="html5">
set(blend4, %1);
sub(blend3, 1.0, %1);
copy(hotspot[face_pano1_F].alpha, blend1);
copy(hotspot[face_pano1_L].alpha, blend1);
copy(hotspot[face_pano1_R].alpha, blend1);
copy(hotspot[face_pano1_B].alpha, blend1);
copy(hotspot[face_pano1_Z].alpha, blend1);
copy(hotspot[face_pano1_N].alpha, blend1);
copy(hotspot[face_pano2_F].alpha, blend2);
copy(hotspot[face_pano2_L].alpha, blend2);
copy(hotspot[face_pano2_R].alpha, blend2);
copy(hotspot[face_pano2_B].alpha, blend2);
copy(hotspot[face_pano2_Z].alpha, blend2);
copy(hotspot[face_pano2_N].alpha, blend2);
</action>
|
Additional XMLs have just the necessary code to change these actions and apply them to their specific panos:
|
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
|
<action name="start">
showtext('[b][i]krpano[br]xml slider / blending cubes example[/i][/b]', infostyle);
addcube(pano3);
addcube(pano4);
setblend(0);
</action>
<action name="setblend" devices="flash">
sub(blend3, 1.0, %1);
setcubealpha(pano4, %1);
setcubealpha(pano3, get(blend3));
</action>
<action name="setblend" devices="html5">
set(blend4, %1);
sub(blend3, 1.0, %1);
copy(hotspot[face_pano1_F].alpha, blend4);
copy(hotspot[face_pano1_L].alpha, blend4);
copy(hotspot[face_pano1_R].alpha, blend4);
copy(hotspot[face_pano1_B].alpha, blend4);
copy(hotspot[face_pano1_Z].alpha, blend4);
copy(hotspot[face_pano1_N].alpha, blend4);
copy(hotspot[face_pano2_F].alpha, blend3);
copy(hotspot[face_pano2_L].alpha, blend3);
copy(hotspot[face_pano2_R].alpha, blend3);
copy(hotspot[face_pano2_B].alpha, blend3);
copy(hotspot[face_pano2_Z].alpha, blend3);
copy(hotspot[face_pano2_N].alpha, blend3);
</action>
|
I have buttons in my tour that just load the relevant xml file when clicked.
There are 3 xml files total. I can post them here if you want.
Hope that helps. Any input you have is appreciated!
Tyler