Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

Tourvista

Fortgeschrittener

  • »Tourvista« ist der Autor dieses Themas

Beiträge: 246

Wohnort: Leicester UK

  • Nachricht senden

1

Mittwoch, 29. April 2009, 13:20

<krpano> tag, onstart and delayedcall

Hello,

I use the following code to hide instrucions automatically after 10 seconds. It works and I am very happy with it.

Quellcode

1
<krpano version="1.0.8" onstart="delayedcall(10, action(hideinstructions); );">


At the momment I have the panoramas in itscorresponging folder (room1, room2, room3, etc...)

Inside each folder I have the panorama image and a pano.xml file which contains all the parameters that may be different depending on the panorama ( hlookat, vlookat, tileimagewidth, etc...)

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<krpano version="1.0.8" onstart="delayedcall(10, action(hideinstructions); );">

<include url="../global.xml"/>

<include url="../plugins.xml"/>

	 <view hlookat="-15"
	      vlookat="0"
	      fov="60" fovmin="45" fovmax="90" 
	      fisheye="0.44" fisheyefovlink="2.40" limitfov="true" 
	      />

    <preview type="cubestrip" url="preview.jpg" details="8"
	/>

    <image type="SPHERE" multires="yes" tilesize="500">
	    <level download="all" tiledimagewidth="5500" tiledimageheight="2750">
            <sphere url="tiles_10_%0v_%0u.jpg" />
	    </level>
    </image>

</krpano> 

As you can see I include global.xml and plugins.xml. Both files contain all the parameters common in all the panoramas (display, autoritate, progress, plugins, etc..)
This way if I would like to change the display details parameters I just have to edit globals.xml once and it will affect all the panormas.

Now, the question: is there another way to call the action 'hideinstructions' apart from inside the <krpano> tag? If in the future I wouldn't like to edit all the pano.xml files if I would like to change the delayedcall from 10 to 20.

Thanks in advance.

Graydon

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

2

Donnerstag, 30. April 2009, 04:43

you might be able to change this...

Quellcode

1
<krpano version="1.0.8" onstart="delayedcall(10, action(hideinstructions); );">


to...

Quellcode

1
<krpano version="1.0.8" onstart="action(hideinstructions); );">


and then in your "hideinstructions" action use the wait function... reference link below.

http://www.krpano.com/docu/actions/#wait

Then, when you want to change the wait... it's only changed once in the "hideinstructions" action.

You'll want to be sure to use the oninterrupt item as well...

http://www.krpano.com/docu/actions/#oninterrupt

... otherwise users will be stuck waiting until your hideinstructions sequence is complete, including however long you set the wait for.

Graydon

Tourvista

Fortgeschrittener

  • »Tourvista« ist der Autor dieses Themas

Beiträge: 246

Wohnort: Leicester UK

  • Nachricht senden

3

Donnerstag, 30. April 2009, 10:00

That's clever!

Thanks!

Tourvista

Fortgeschrittener

  • »Tourvista« ist der Autor dieses Themas

Beiträge: 246

Wohnort: Leicester UK

  • Nachricht senden

4

Freitag, 1. Mai 2009, 21:09

I just saw this post in the forum

I have tried the following but it doesn't work

Quellcode

1
so.addVariable("krpano.onstart","delayedcall(10, action(hideinstructions); );");


neither


Quellcode

1
so.addVariable("krpano.onstart"," action(hideinstructions );");


Am i in the right way?

Thanks!

Graydon

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

5

Samstag, 2. Mai 2009, 03:23

At first I thought maybe the

Quellcode

1
);
weren't matching up... but it looks like they are.

Then I thought... there's something screwy with IE and having to leave off the ; on the last variable... but I think that's a swfobject 2.1 issue only...

... so that only leaves me the following suggestion (which the other post seems to indicate doesn't matter)
- change

Quellcode

1
krpano.onstart
to just

Quellcode

1
onstart


Other than that... *confused*

6

Montag, 4. Mai 2009, 10:12

Now, the question: is there another way to call the action 'hideinstructions' apart from inside the <krpano> tag? If in the future I wouldn't like to edit all the pano.xml files if I would like to change the delayedcall from 10 to 20.
Hi,

in the 1.0.8 beta 7 there are also some new events that could help here:

"onxmlcomplete" - will be called when a XML or a SCENE was loaded
"onloadcomplete" - will be called when the loading of the pano images was done

e.g.

Quellcode

1
2
3
<events onxmlcomplete="..."
        onloadcomplete="..."
        />


these events will be called in every new loaded XML until
the events itself will be redefined,

best regards,
Klaus