Trying to figure out how to prevent my intro image from reloading every time I go back to the first pano. I did find an example but the replies are in German and I don't understand which one would be the correct approach.
Thanks
Robert
Trying to figure out how to prevent my intro image from reloading every time I go back to the first pano. I did find an example but the replies are in German and I don't understand which one would be the correct approach.
Thanks
Robert
Hi,
can you show your tour?
then it would be easier to show the right code for it,
it depends on your tour structure how to do that,
best regards,
Klaus
Hello Klaus,
Please see the code below.
QuoteDisplay More<krpano version="1.0.8" onstart="action(start)">
<!-- text style for startup info -->
<textstyle name="infostyle" origin="top" edge="top" yoffset="20" textalign="center" background="false" border="false" fontsize="40" textcolor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);" showtime="1.0" fadetime="1.0" /><preview type="CUBESTRIP" url="lobby.tiles/preview.jpg" />
<image type="CUBE" multires="true" tilesize="4000">
<level tiledimagewidth="2200" tiledimageheight="2200">
<left url="lobby.tiles/pano_l_%0v%0h.jpg" />
<front url="lobby.tiles/pano_f_%0v%0h.jpg" />
<right url="lobby.tiles/pano_r_%0v%0h.jpg" />
<back url="lobby.tiles/pano_b_%0v%0h.jpg" />
<up url="lobby.tiles/pano_u_%0v%0h.jpg" />
<down url="lobby.tiles/pano_d_%0v%0h.jpg" />
</level>
</image><!-- include buttons template (based on the buttons.png image)-->
<include url="buttons-png-include.xml" keep="true" /><autorotate enabled="true"
waittime="6.0"
accel="1.5"
speed="10"
horizon="0"
tofov="100"
/><!-- combobox plugin -->
<plugin name="box" url="http://www.eyecandyvi.com/krpano/plugins/combobox.swf" preload="true"
keep="true"
align="lefttop" x="10" y="10" width="150"
blendmode="layer"
/><action name="start">
plugin[box].addIdItem(1, 'Lobby', loadscene(lobby, null, MERGE, BLEND(1)); );
plugin[box].addIdItem(2, 'Room 1', loadscene(room1, null, MERGE, BLEND(1)); );
plugin[box].addIdItem(3, 'Room 2', loadscene(room2, null, MERGE, BLEND(1)); );
plugin[box].addIdItem(4, 'Room 3', loadscene(room3, null, MERGE, BLEND(1)); );
plugin[box].addIdItem(5, 'Room 4', loadscene(room4, null, MERGE, BLEND(1)); );
plugin[box].addIdItem(6, 'Room 5', loadscene(room5, null, MERGE, BLEND(1)); );
plugin[box].addIdItem(7, 'Room 6', loadscene(room6, null, MERGE, BLEND(1)); );
plugin[box].addIdItem(8, 'Room 7', loadscene(room7, null, MERGE, BLEND(1)); );
plugin[box].addIdItem(9, 'Playground - Covered', loadscene(play1, null, MERGE, BLEND(1)); );
plugin[box].addIdItem(10, 'Playground - Open', loadscene(play2, null, MERGE, BLEND(1)); );<!-- load 1. scene on start -->
loadscene(Lobby, null, MERGE);
</action><!-- first scene/pano-->
<scene name="Lobby" onstart="action(startscene);"><action name="startscene">
plugin[box].selectIdItem(1);
</action><view hlookat="30" vlookat="0" fov="100" />
<image type="CUBE" multires="true" tilesize="4000">
<level tiledimagewidth="2200" tiledimageheight="2200">
<left url="lobby.tiles/pano_l_%0v%0h.jpg" />
<front url="lobby.tiles/pano_f_%0v%0h.jpg" />
<right url="lobby.tiles/pano_r_%0v%0h.jpg" />
<back url="lobby.tiles/pano_b_%0v%0h.jpg" />
<up url="lobby.tiles/pano_u_%0v%0h.jpg" />
<down url="lobby.tiles/pano_d_%0v%0h.jpg" />
</level>
</image><!-- place here scene local elements like plugins,hotspots, ... -->
<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>
<plugin name="openimage"
url="imagebox.png"
align="center" x="10" y="10"
alpha="0"
visible="false"
onclick="action(close,get(name));"
/><hotspot name="fyi"
url="fyi.png"
ath="0"
atv="0"
scale="0.3"
alpha="0.3"
onover="tween(alpha,1);tween(scale,0.6);"
onout="tween(alpha,0.3);tween(scale,0.3);"
onclick="action(open,openimage);"
/>
<events onloadcomplete="delayedcall(5, hideintroimage() ); set(events.onloadcomplete,null);" />
<plugin name="introimage"
url="introimage.png"
align="center"
onloaded="set(alpha,0); tween(alpha,1.0);"
onclick="hideintroimage();"
/><action name="hideintroimage">
if(plugin[introimage].enabled,
set(plugin[introimage].enabled,false);
tween(plugin[introimage].alpha, 0.0, 0.5, default, removeplugin(introimage));
);
</action></scene>
<!-- second scene/pano-->
<scene name="Room1" onstart="action(startscene);"><action name="startscene">
plugin[box].selectIdItem(2);
</action><view hlookat="105" vlookat="0" fov="100" />
<image type="CUBE" multires="true" tilesize="4000">
<level tiledimagewidth="2200" tiledimageheight="2200">
<left url="room1.tiles/pano_l_%0v%0h.jpg" />
<front url="room1.tiles/pano_f_%0v%0h.jpg" />
<right url="room1.tiles/pano_r_%0v%0h.jpg" />
<back url="room1.tiles/pano_b_%0v%0h.jpg" />
<up url="room1.tiles/pano_u_%0v%0h.jpg" />
<down url="room1.tiles/pano_d_%0v%0h.jpg" />
</level>
</image><!-- place here scene local elements like plugins,hotspots, ... -->
<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>
<plugin name="openimage"
url="imagebox.png"
align="center" x="10" y="10"
alpha="0"
visible="false"
onclick="action(close,get(name));"
/><hotspot name="fyi"
url="fyi.png"
ath="85"
atv="-10"
scale="0.3"
alpha="0.3"
onover="tween(alpha,1);tween(scale,0.6);"
onout="tween(alpha,0.3);tween(scale,0.3);"
onclick="action(open,openimage);"
/>
</scene>
<!-- third scene/pano-->
<scene name="Room2" onstart="action(startscene);"><action name="startscene">
plugin[box].selectIdItem(3);
</action><view hlookat="-110" vlookat="8" fov="100" />
<image type="CUBE" multires="true" tilesize="4000">
<level tiledimagewidth="2200" tiledimageheight="2200">
<left url="room2.tiles/pano_l_%0v%0h.jpg" />
<front url="room2.tiles/pano_f_%0v%0h.jpg" />
<right url="room2.tiles/pano_r_%0v%0h.jpg" />
<back url="room2.tiles/pano_b_%0v%0h.jpg" />
<up url="room2.tiles/pano_u_%0v%0h.jpg" />
<down url="room2.tiles/pano_d_%0v%0h.jpg" />
</level>
</image></scene>
<!-- fourth scene/pano-->
<scene name="Room3" onstart="action(startscene);"><action name="startscene">
plugin[box].selectIdItem(4);
</action><view hlookat="-110" vlookat="8" fov="100" />
<image type="CUBE" multires="true" tilesize="4000">
<level tiledimagewidth="2200" tiledimageheight="2200">
<left url="room3.tiles/pano_l_%0v%0h.jpg" />
<front url="room3.tiles/pano_f_%0v%0h.jpg" />
<right url="room3.tiles/pano_r_%0v%0h.jpg" />
<back url="room3.tiles/pano_b_%0v%0h.jpg" />
<up url="room3.tiles/pano_u_%0v%0h.jpg" />
<down url="room3.tiles/pano_d_%0v%0h.jpg" />
</level>
</image></scene>
<!-- fifth scene/pano-->
<scene name="Room4" onstart="action(startscene);"><action name="startscene">
plugin[box].selectIdItem(5);
</action><view hlookat="-110" vlookat="8" fov="100" />
<image type="CUBE" multires="true" tilesize="4000">
<level tiledimagewidth="2200" tiledimageheight="2200">
<left url="room4.tiles/pano_l_%0v%0h.jpg" />
<front url="room4.tiles/pano_f_%0v%0h.jpg" />
<right url="room4.tiles/pano_r_%0v%0h.jpg" />
<back url="room4.tiles/pano_b_%0v%0h.jpg" />
<up url="room4.tiles/pano_u_%0v%0h.jpg" />
<down url="room4.tiles/pano_d_%0v%0h.jpg" />
</level>
</image></scene>
<!-- sixth scene/pano-->
<scene name="Room5" onstart="action(startscene);"><action name="startscene">
plugin[box].selectIdItem(6);
</action><view hlookat="-110" vlookat="8" fov="100" />
<image type="CUBE" multires="true" tilesize="4000">
<level tiledimagewidth="2200" tiledimageheight="2200">
<left url="room5.tiles/pano_l_%0v%0h.jpg" />
<front url="room5.tiles/pano_f_%0v%0h.jpg" />
<right url="room5.tiles/pano_r_%0v%0h.jpg" />
<back url="room5.tiles/pano_b_%0v%0h.jpg" />
<up url="room5.tiles/pano_u_%0v%0h.jpg" />
<down url="room5.tiles/pano_d_%0v%0h.jpg" />
</level>
</image></scene>
<!-- seventh scene/pano-->
<scene name="Room6" onstart="action(startscene);"><action name="startscene">
plugin[box].selectIdItem(7);
</action><view hlookat="-110" vlookat="8" fov="100" />
<image type="CUBE" multires="true" tilesize="4000">
<level tiledimagewidth="2200" tiledimageheight="2200">
<left url="room6.tiles/pano_l_%0v%0h.jpg" />
<front url="room6.tiles/pano_f_%0v%0h.jpg" />
<right url="room6.tiles/pano_r_%0v%0h.jpg" />
<back url="room6.tiles/pano_b_%0v%0h.jpg" />
<up url="room6.tiles/pano_u_%0v%0h.jpg" />
<down url="room6.tiles/pano_d_%0v%0h.jpg" />
</level>
</image></scene>
<!-- eighth scene/pano-->
<scene name="Room7" onstart="action(startscene);"><action name="startscene">
plugin[box].selectIdItem(8);
</action><view hlookat="-110" vlookat="8" fov="100" />
<image type="CUBE" multires="true" tilesize="4000">
<level tiledimagewidth="2200" tiledimageheight="2200">
<left url="room7.tiles/pano_l_%0v%0h.jpg" />
<front url="room7.tiles/pano_f_%0v%0h.jpg" />
<right url="room7.tiles/pano_r_%0v%0h.jpg" />
<back url="room7.tiles/pano_b_%0v%0h.jpg" />
<up url="room7.tiles/pano_u_%0v%0h.jpg" />
<down url="room7.tiles/pano_d_%0v%0h.jpg" />
</level>
</image></scene>
<!-- ninth scene/pano-->
<scene name="Play1" onstart="action(startscene);"><action name="startscene">
plugin[box].selectIdItem(9);
</action><view hlookat="-41.52" vlookat="-3.8" fov="100" />
<image type="CUBE" multires="true" tilesize="4000">
<level tiledimagewidth="2200" tiledimageheight="2200">
<left url="play1.tiles/pano_l_%0v%0h.jpg" />
<front url="play1.tiles/pano_f_%0v%0h.jpg" />
<right url="play1.tiles/pano_r_%0v%0h.jpg" />
<back url="play1.tiles/pano_b_%0v%0h.jpg" />
<up url="play1.tiles/pano_u_%0v%0h.jpg" />
<down url="play1.tiles/pano_d_%0v%0h.jpg" />
</level>
</image></scene>
<!-- tenth scene/pano-->
<scene name="Play2" onstart="action(startscene);"><action name="startscene">
plugin[box].selectIdItem(10);
</action><view hlookat="-4.24" vlookat="-3.8" fov="100" />
<image type="CUBE" multires="true" tilesize="4000">
<level tiledimagewidth="2200" tiledimageheight="2200">
<left url="play2.tiles/pano_l_%0v%0h.jpg" />
<front url="play2.tiles/pano_f_%0v%0h.jpg" />
<right url="play2.tiles/pano_r_%0v%0h.jpg" />
<back url="play2.tiles/pano_b_%0v%0h.jpg" />
<up url="play2.tiles/pano_u_%0v%0h.jpg" />
<down url="play2.tiles/pano_d_%0v%0h.jpg" />
</level>
</image></scene>
</krpano>
Hi,
put all the introimage related stuff outside of the <scene> tags,
and add keep="true" to all related elements,
then it should show only once,
best regards,
Klaus
again, that's brilliant!
Thanks
Hi, i've the same problem.
I've put this script outside the scene tag
<events onloadcomplete="delayedcall(100, hideintroimage() ); set(events.onloadcomplete,null);" />
<plugin name="introimage"
url="intro.swf"
align="center"
scale="0.9"
onloaded="set(alpha,0); tween(alpha,0.8);"
onclick="hideintroimage();"
/>
<action name="hideintroimage">
if(plugin[introimage].enabled,
set(plugin[introimage].enabled,false);
tween(plugin[introimage].alpha, 0.0, 0.5, default, removeplugin(introimage));
);
</action>
Display More
but the intro image doesn't appear on start.
Could you help me?
Thanks
No one?
Please....
replace the intro.swf with a regular jpg image. make sure that is not the problem. the code itself seems correct.
ok! that works -but how can the introimage reload /
appear after certain time of inactivity again ?
with this code:
<krpano version="1.0.8" >
<events onloadcomplete="delayedcall(100, hideintroimage() ); set(events.onloadcomplete,null);" />
<plugin name="introimage"
url="intro.png"
align="center"
scale="0.9"
onloaded="set(alpha,0); tween(alpha,0.8);"
onclick="hideintroimage();"
/>
<action name="hideintroimage">
if(plugin[introimage].enabled,
set(plugin[introimage].enabled,false);
tween(plugin[introimage].alpha, 0.0, 0.5, default, removeplugin(introimage));
);
</action>
<image>
<cubestrip url="pano.jpg" />
</image>
</krpano>
Don’t have an account yet? Register yourself now and be a part of our community!