Hi,
yes, here is the code:
http://krpano.com/panos/hafen/hafen_simpleviewer.xml
first, there a two buttons, one to show and one to hide the gallery:
|
Source code
|
1
2
|
<plugin name="showgallery" url="showgallery.png" autopos="bottom,0,20" visible="true" alpha="1" onclick="action(showgallery);" />
<plugin name="hidegallery" url="hidegallery.png" autopos="bottom,0,20" visible="false" alpha="1" onclick="action(hidegallery);" />
|
then there is a "empty", invisible plugin, to avoid loading the gallery images on start
(but it would be also possible to set the url to imagegallaries swf at start)
|
Source code
|
1
|
<plugin name="gallery" url="" visible="false" alpha="0" />
|
now the action to show the gallery:
1. first freezeview() was called to stop the pano rendering (performance improve)
2. then my logo is faded out
3. the show/hide buttons are faded out and in
4. then the
"url" is set to
simpleviewer.swf?xmlDataPath=panos/hafen/gallery.xml
(now the plugin loads this url)
5. finally it is set to visible, and faded in
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<action name="showgallery">
freezeview(true);
tween(plugin[logo].alpha,0,distance(1,0.15),,set(plugin[logo].visible,false));
set(plugin[showgallery].enable,false);
tween(plugin[showgallery].alpha,0,distance(1,0.15),,set(plugin[showgallery].visible,false));
set(plugin[hidegallery].enable,true);
set(plugin[hidegallery].visible,true);
tween(plugin[hidegallery].alpha,1,distance(1,0.15));
set(plugin[gallery].url,simpleviewer.swf?xmlDataPath=panos/hafen/gallery.xml);
set(plugin[gallery].visible,true);
tween(plugin[gallery].alpha,1,distance(1,0.15));
</action>
|
for hiding the gallery, it is first faded out, and then are the buttons
changed again, the logo is faded in...
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<action name="hidegallery">
tween(plugin[gallery].alpha,0,distance(1,0.15),,action(closegallery));
</action>
<action name="closegallery">
set(plugin[gallery].visible,false);
freezeview(false);
set(plugin[logo].visible,true);
tween(plugin[logo].alpha,1,distance(1,0.15));
set(plugin[hidegallery].enable,false);
tween(plugin[hidegallery].alpha,0,distance(1,0.15),,set(plugin[hidegallery].visible,false));
set(plugin[showgallery].enable,true);
set(plugin[showgallery].visible,true);
tween(plugin[showgallery].alpha,1,distance(1,0.15));
</action>
|
but it would be also possible to do that much simpler,
e.g. just change "visible" for show and hide
best regards,
Klaus