Hi,
Before using krpano I worked with TourWeaver to make virtual tours, the default actions were easy and I could customize a buttoms skin.
I wonder if i can make buttoms to go forward and back through the panos in a VT.(next scene, previous scene)
If so how can I do it???
I mean to load panos in the order they are
Please help
Next - Previous scene
-
-
Hi,
Klaus made an automated solution for this
Code
Display More<action name="prevscene"> if(%1 != findnext, sub(i,scene.count,1)); txtadd(scenexml,'<krpano>',get(scene[%i].content),'</krpano>'); if(scenexml == xml.content, dec(i); if(i LT 0, sub(i,scene.count,1)); loadscene(get(scene[%i].name), null, MERGE, BLEND(1)); , dec(i); if(i GE 0, prevscene(findnext)); ); </action> <action name="nextscene"> if(%1 != findnext, set(i,0)); txtadd(scenexml,'<krpano>',get(scene[%i].content),'</krpano>'); if(scenexml == xml.content, inc(i); if(i == scene.count, set(i,0)); loadscene(get(scene[%i].name), null, MERGE, BLEND(1)); , inc(i); if(i LT scene.count, nextscene(findnext)); ); </action>
You just need to make a plugin with onclick="action(prevscene);" and one with onclick="action(nextscene);" to call the actions...
Regards
Michael -
hi!
one more version<action name="nextscene">
add(nextsceneindex, get(scene[get(xml.scene)].index),1);
if(nextsceneindex LT scene.count, loadscene(get(scene[get(nextsceneindex)].name), null, MERGE, BLEND(0.7)); );
</action><action name="prevscene">
sub(prevsceneindex, get(scene[get(xml.scene)].index),1);
if(prevsceneindex GT -1, loadscene(get(scene[get(nextsceneindex)].name), null, MERGE, BLEND(0.7)); );
</action>Using: onclick="nextscene()" or onclcik="prevscene();"
Regards
Andrey -
I really thank you you both!
That was helpfulNow... is there any way to display scene's names as they change...
-
I want to move the camera on a button and when I use onclick="loadscene(scene_7)" the panorama changes to the given one but the camera moves to zero coordinates, but if I use onclick="loadscene(scene_7,null,KEEP3D,BLEND(1) );" the panorama also changes, but the camera freezes in the previous position
-
" move the camera on a button " ?
you mean look at a button ?
https://krpano.com/docu/actions/#lookto -
" move the camera on a button " ?
you mean look at a button ?
https://krpano.com/docu/actions/#looktoNo, I mean moving by x y z, for example the scene is at x=100 y=200 z=50 and I have a problem that when I write "loadscene" command, all my coordinates = 0.
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!