Sie sind nicht angemeldet.

Shanti

Fortgeschrittener

  • »Shanti« ist der Autor dieses Themas

Beiträge: 301

Wohnort: Puerto Vallarta

Beruf: Web Developer

  • Nachricht senden

1

Montag, 16. März 2009, 22:53

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

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

2

Dienstag, 17. März 2009, 05:04

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

Fortgeschrittener

  • »Shanti« ist der Autor dieses Themas

Beiträge: 301

Wohnort: Puerto Vallarta

Beruf: Web Developer

  • Nachricht senden

3

Dienstag, 17. März 2009, 05:59

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

4

Dienstag, 17. März 2009, 09:22

Hi,

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

Quellcode

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

Dienstag, 17. März 2009, 11:55

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

Fortgeschrittener

  • »Shanti« ist der Autor dieses Themas

Beiträge: 301

Wohnort: Puerto Vallarta

Beruf: Web Developer

  • Nachricht senden

6

Dienstag, 17. März 2009, 17:57

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

:D

7

Dienstag, 17. März 2009, 22:09

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

Schüler

Beiträge: 89

Wohnort: All over

Beruf: this

  • Nachricht senden

8

Sonntag, 9. August 2009, 07:23

ERROR: if() - syntax error:

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

even with beta 8 - any ideas?

Cheers

John

9

Montag, 10. August 2009, 14:59

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

if() syntax:

Quellcode

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