You are not logged in.

Shanti

Intermediate

  • "Shanti" started this thread

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

1

Monday, March 16th 2009, 10:53pm

Next / PRevious

Hello, been working with FPP and the dropdown plugin by Patrick Cheatham, it has a nice feature that you can create 2 hotspots (next, previous) when you click the next button it loads the next pano, and viceversa, is there anyway to do this on Krpano? I want to switch my website to krpano but this is a must feature.

I came up with a PHP solution, but I would rather have an internal solution if possible. I looked around the forum and the documentation, but didn't found anything.

any ideas? *confused*

Thanks
Shanti

Graydon

Professional

Posts: 614

Location: Texas

Occupation: Industrial gas turbine services.

  • Send private message

2

Tuesday, March 17th 2009, 5:04am

Depending upon how you want to setup your panos / xml files there are several ways to do this manually... but I don't know if any automatic way.

Shanti

Intermediate

  • "Shanti" started this thread

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

3

Tuesday, March 17th 2009, 5:59am

no, not automatic, but 2 hotspots that when clicked load the next or previous pano in the xml...

4

Tuesday, March 17th 2009, 9:22am

Hi,

there are many ways to do that,
this would be one:

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
<krpano onstart="action(startup)">

<action name="startup">
  <!-- create a variable - "currentpano" - this is the number of the current pano -->
  set(currentpano,1);
  action(loadpanos);
</action>

<action name="loadpanos">
  <!-- depending on the "currentpano" variable load a pano -->
  if(currentpano == 1, loadpano(pano1.xml, null, MERGE, BLEND(1)) );
  if(currentpano == 2, loadpano(pano2.xml, null, MERGE, BLEND(1)) );
  if(currentpano == 3, loadpano(pano3.xml, null, MERGE, BLEND(1)) );
  if(currentpano == 4, loadpano(pano4.xml, null, MERGE, BLEND(1)) );
</action>

<action name="prevpano">
  dec(currentpano, 1, 1,4);
  action(loadpanos);
</action>

<action name="nextpano">
  inc(currentpano, 1, 4,1);
  action(loadpanos);
</action>

<plugin name="nextbutton" url="..." ... keep="true" onclick="action(nextpano);" />
<plugin name="prevbutton" url="..." ... keep="true" onclick="action(prevpano);" />

</krpano>


all panos to load are in one place - in the "loadpanos" action

best regards,
Klaus

5

Tuesday, March 17th 2009, 11:55am

complete documentation

Dear Klaus reading this forum i found always new action functions attributes ("if" i never see before), could you post complete documentation.
thank you again for your fantastic player.

Shanti

Intermediate

  • "Shanti" started this thread

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

6

Tuesday, March 17th 2009, 5:57pm

Thanks Klaus, I didn't even knew INC and DEC were available! :) but it worked!!!!!!

:D

7

Tuesday, March 17th 2009, 10:09pm

Dear Klaus reading this forum i found always new action functions attributes ("if" i never see before), could you post complete documentation.
thank you again for your fantastic player.

I know
it's because this new features are all from the 1.0.8 beta version,
the main documentation will be updated when the version will be finally released,
same parts are still in work at the moment,

you find all current new features/functions listed in the "releasenotes.txt" file
and in this thread:
http://krpano.com/forum/wbb/index.php?pa…ad&threadID=120

best regards,
Klaus

flash360

Trainee

Posts: 89

Location: All over

Occupation: this

  • Send private message

8

Sunday, August 9th 2009, 7:23am

ERROR: if() - syntax error:

I get a ERROR: if() - syntax error:

even with beta 8 - any ideas?

Cheers

John

9

Monday, August 10th 2009, 2:59pm

Hi,
I get a ERROR: if() - syntax error:
that means there are too few arguments for the if() action,

if() syntax:

Source code

1
if(condition, trueaction, falseaction*);

* falseaction is optional

see also here:
http://krpano.com/forum/wbb/index.php?pa…tID=406#post406
and here for "new if() operators":
http://krpano.com/forum/wbb/index.php?pa…D=2598#post2598

best regards,
Klaus