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.

tommo77funk

Schüler

  • »tommo77funk« ist der Autor dieses Themas

Beiträge: 150

Wohnort: London

Beruf: Photographer

  • Nachricht senden

1

Freitag, 17. Juli 2009, 16:59

Programming an automatic tour

Hi,

I would like to program an automatic tour, so i can sit back and not use the mouse. I plan to have a button that fires off an action with a chain of events that move the viewer to points of interest then loads a new panorama.

In thinking about it I had planned to write an automatic xml with the auto action in it, but have come across problems in the past, in that if the user hits the auto tour button on a panorama other than the first then the auto tour gets mucked up.

So I am starting to think a better way would be to put an automatic action in each panorama xml, and have some kind of code that checks if the auto button is active, if it is play auto action in that panorama, if not assume manual controls.

Is this the best way do you think and is it possible to check if a button is active/enabled ? I guess it would be a conditional statement - I will check forum if there is any similar code and come back with my efforts. The tour will consist of about 20 panoramas.

As always many many thanks for any advice given,

Best wishes,

tom

tommo77funk

Schüler

  • »tommo77funk« ist der Autor dieses Themas

Beiträge: 150

Wohnort: London

Beruf: Photographer

  • Nachricht senden

2

Samstag, 18. Juli 2009, 05:32

I tried this...

<krpano version="1.0.8" onstart="action(check-auto-tour);">

<action name="check-auto-tour">
if(autotour-button.enabled == true, action(play-tour); autotour-button.enabled == false, action(dont-play-tour); );"
</action>

<action name="play-tour">
lookto(330,282,30,smooth(100,50,20));
wait(3);
lookto(1,209,300);
wait(3);
loadpano(test3.xml,null,MERGE,BLEND(1));
</action>

<action name="dont-play-tour">
set(autorotate.enabled,false);
</action>

<plugin name="autotour-button" enabled="true" visible="true" handcursor="true" keep="true" url="buttons/rotated.png" zorder="2" align="bottom" edge="center" y="309" x="240" blendmode="screen" onover="set(blendmode,add);" onout="set(blendmode,screen);" onhover="showtext(Auto tour on / off)" onclick="action(play-tour);" />

<plugin name="stop_autotour-button" enabled="true" visible="false" handcursor="true" keep="true" url="buttons/rotated.png" zorder="2" align="bottom" edge="center" y="309" x="240" blendmode="screen" onover="set(blendmode,add);" onout="set(blendmode,screen);" onhover="showtext(Auto tour on / off)" onclick="action(dont-play-tour);" />

<action name="auto-tour_on">
set(plugin[autotour-button].enable,false);
set(plugin[autotour-button].visible,false);
set(plugin[stop_autotour-button].enable,true);
set(plugin[stop_autotour-button].visible,true);
</action>

<action name="auto-tour_off">
set(plugin[stop_autotour-buttont].enable,false);
set(plugin[stop_autotour-button].visible,false);
set(plugin[autotour-button].enable,true);
set(plugin[autotour-button].visible,true);
</action>


but I dont think 'enabled' is the same as declaring if a button is checked or not ?

tommo77funk

Schüler

  • »tommo77funk« ist der Autor dieses Themas

Beiträge: 150

Wohnort: London

Beruf: Photographer

  • Nachricht senden

3

Samstag, 18. Juli 2009, 14:03

or one solution I am pondering is it might be better to write a conditional on the pano name that plays the relavent events.

So 1 big action that gets triggered by the auto tour button, with conditional statements that check the panorama names then plays those events. Although I can imagine the permutations !

a failsafe option might be to do an automatic tour that returns to first panorama when auto tour button is clicked, then the events are played, with a conditional only on the first panorama to check its not going to load the 1st one even though the 1st one is being viewed.

I remember when programming with immervision java player there was a function for checking if a button had been clicked or not. I've looked through the docs and can only find enabled as a possible example of this.

I will dig deeper into the docs today so hope to have some better ideas later,

cheers,

tom

tommo77funk

Schüler

  • »tommo77funk« ist der Autor dieses Themas

Beiträge: 150

Wohnort: London

Beruf: Photographer

  • Nachricht senden

4

Dienstag, 21. Juli 2009, 17:44

Hi,

Is it possible to give each panorama a name variable ? Like a function called panoname where you can declare a name specific for that panorama, then it would be possible to right conditionals statements for it in the global.xml.

e.g.

if panoname[pano1],action(pano1actions);

else if


if panoname[pano2],action(pano2actions);

Because then i could have a button in the global.xml that checks for the panorama name then activates a relevant action/event for it. This could help solve my problem for an automatic tour, that the user can activate on any panorama, and they will get the relevent events happening.

Hope this makes sense, please let me know if this is already possible or if there is a better way.

Many thanks

tom

5

Dienstag, 21. Juli 2009, 19:32

I think if possible with the "event" and the "autorotate"

see here and put the autorotate on ;-)

tommo77funk

Schüler

  • »tommo77funk« ist der Autor dieses Themas

Beiträge: 150

Wohnort: London

Beruf: Photographer

  • Nachricht senden

6

Dienstag, 21. Juli 2009, 23:46

Hi Job.1,

Thanks for your reply, I think I saw a post on event and autorotate here which is certainly very helpful and I am studying it to see if it can help. I'll let you know how I get on. The main problem I have is say I have 20 panoramas and I program all the movements and order I want the panoramas to load under one action. Then it will only play right if executed from the first panorama. However if I want to have this facility on offer whilst someone is using the tour they could be navigating on any of the 20 panoramas meaning the first movements will apply to whatever panorama is showing. So i am looking for a good solution to handle this. There are however lots of work arounds I could do, like only show the auto tour button at the start of the tour. I am just investigating at the moment, and feel there are 2 useful functions that I could perhaps do with, and that is panoramaName and a function to say if a plugin/button has been clicked or unclicked.

like this perhaps

if (panoramaName=="london")
{
if (get("auto-button","clicked")==true)
set("london-action-name","enabled","true");
}
else if (panoramaName=="Manchester")
{
if (get("auto-button","clicked")==true)
set("manchester-action-name","enabled","true");
}

Does your example, use something like if auto-rotate button clicked play in the next panorama, if not don't rotate, i'm not sure I understand zephyr's example, in particular what 'EQ 1' means.

I'll just keep studying the docs and forum and practising. krpano is so addictive, Thanks Job.1 ! By the way great example of before and after shot - I did not realise it was the same place at first. The builders did a great job.

Best wishes,

tom

7

Montag, 10. August 2009, 20:14

Hi,
job.1. Do you have the XML code for your example of http://www.job-360.fr/krpano/morphing/morphing.html ?

I am trying to detect when a view reaches a certain hlookat value in order to trigger an action, just like in your above example to load the next scene, but it doesn't seem to work.
Currently using beta 8.


Thanks :)

tommo77funk

Schüler

  • »tommo77funk« ist der Autor dieses Themas

Beiträge: 150

Wohnort: London

Beruf: Photographer

  • Nachricht senden

8

Dienstag, 11. August 2009, 02:57

hi Davcom,

I think the code used by job.1 is similar to here if statement and wait() bugged? have you tried this yet ?

RE. programming a virtual tour - I believe I have found a big clue from this helpful post Next / PRevious

tom :)

9

Dienstag, 11. August 2009, 09:33

I take the event example to make this tour *rolleyes*

Ähnliche Themen