You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Tuesday, October 19th 2010, 8:20am

Problem with automatic tour

Hi,

I have a small problem with automatic tour code. A customer wants a tour which go through their manor by itself and i built the code for it already. The problem is that the code worked well on friday but now, something is wrong. I put the code below

Source code

1
2
3
4
5
6
7
8
9
10
11
set(step,1);set(idletime,4);set(events.onidle,action(autotour) );
oninterrupt();if(step == 1, lookto(50,0,90,smooth(3,-3,15)); inc(step); );if(step == 2, wait(1); inc(step); );if(step == 3, lookto(-62,10,90,smooth(3,-3,15)); inc(step); );if(step == 4, wait(1); inc(step); );if(step == 5, lookto(12.38,0,90,smooth(3,-3,15)); inc(step); );if(step == 6, wait(1); inc(step); );<br>if(step == 7, zoomto(40,smooth(5,-5,10)); inc(step); );if(step == 8, loadpano(intro1.xml,null,MERGE,BLEND(1)); inc(step); );
if(step == 9, lookto(131 ,0,90,smooth(3,-3,15)); inc(step); );if(step == 10, wait(1); inc(step); );if(step == 11, lookto(20,0,90,smooth(3,-3,15)); inc(step); );if(step == 12, wait(1); inc(step); );if(step == 13, zoomto(40,smooth(5,-5,10)); inc(step); );if(step == 14, loadpano(intro2.xml,null,MERGE,BLEND(1)); inc(step); );
if(step == 15, lookto(77,8,90,smooth(3,0,15)); inc(step); );if(step == 16, wait(1); inc(step); );if(step == 17, lookto(1,0,90,smooth(3,0,15)); inc(step); );if(step == 18, lookto(-110,8,90,smooth(0,-3,15)); inc(step); );if(step == 19, wait(1); inc(step); );if(step == 20, lookto(-3,0,90,smooth(3,-3,15)); inc(step); );if(step == 21, wait(1); inc(step); );if(step == 22, zoomto(40,smooth(5,-5,10)); inc(step); );if(step == 23, loadpano(intro5.xml,null,MERGE,BLEND(1)); inc(step); );
if(step == 24, lookto(90,22,90,smooth(3,-3,15)); inc(step); );if(step == 25, wait(1); inc(step); );if(step == 26, lookto(1,0,90,smooth(3,0,15)); inc(step); );if(step == 27, lookto(-99,10,90,smooth(0,-3,15)); inc(step); );if(step == 28, wait(1); inc(step); );if(step == 29, lookto(-80,0,90,smooth(3,-3,15)); inc(step); );if(step == 30, zoomto(40,smooth(5,-5,10)); inc(step); );if(step == 31, loadpano(intro3.xml,null,MERGE,BLEND(1)); inc(step); );
if(step == 32, lookto(-170,12,90,smooth(3,-3,15)); inc(step); );if(step == 33, wait(1); inc(step); );if(step == 34, lookto(120,10,90,smooth(3,-3,15)); inc(step); );if(step == 35, lookto(0,0,90,smooth(3,-3,15)); inc(step); );if(step == 36, wait(1); inc(step); );if(step == 37, zoomto(40,smooth(5,-5,10)); inc(step); );if(step == 38, loadpano(intro4.xml,null,MERGE,BLEND(1)); inc(step); );
if(step == 39, lookto(77,21,90,smooth(3,-5,15)); inc(step); );if(step == 40, wait(1); inc(step); );if(step == 41, lookto(1,0,90,smooth(3,0,10)); inc(step); );if(step == 42, lookto(-115,8,90,smooth(0,-3,15)); inc(step); );if(step == 43, wait(1); inc(step); );if(step == 44, lookto(18,0,90,smooth(3,-3,15)); inc(step); );if(step == 45, wait(1); inc(step); );if(step == 46, zoomto(40,smooth(5,-5,10)); inc(step); );
if(step == 47, tourdone(); set(step,1); );
</action>
    <plugin name="openfs" align="bottom" blendmode="screen" keep="true" onclick="set(fullscreen,true);" onout="set(blendmode,screen);" onover="set(blendmode,add);" url="introdata/graphics/menu/menu0.png" x="0" y="10"/>
    <plugin name="closefs" align="bottom" blendmode="screen" keep="true" onclick="set(fullscreen,false);" onout="set(blendmode,screen);" onover="set(blendmode,add);" url="introdata/graphics/menu/menu1.png" visible="false" x="0" y="10"/>    <events onenterfullscreen="set(plugin[openfs].visible,false); set(plugin[closefs].visible,true);" onexitfullscreen="set(plugin[openfs].visible,true); set(plugin[closefs].visible,false);"/></krpano>


The problem is at the step 14,
if(step == 14, loadpano(intro2.xml,null,MERGE,BLEND(1)); inc(step); );

This line don't load the pano. If i remove ";" after BLEND(1)), it will load the pano but not increase the step, making the tour go nowhere. If i put ";" after it, i will get an error:
"ERROR: lookto/moveto/zoomto - invalid parameters"

If anyone can spot my mistake, please let me know. I need to finnish this before end of this month. Thanks a lot!

Regards,
Jesse
Nelike imagery
www.inelike.fi
Jesse Passoja
Passoja design
www.passojadesign.com

2

Thursday, October 21st 2010, 1:43pm

Anyone have any suggestions what could be wrong? I rewrote most of the code and problem still appear. The most weirdest thing is, even if i copy + paste working loading code from step 8. and change it to load intro2.xml instead of intro1, it still don't load it!
It load fine if load it through hotspot.

How it's possible that the code load the pano without ";" in the end but not with it?

I can't think any other way anymore. I changed the .swf file too. no help.
Jesse Passoja
Passoja design
www.passojadesign.com

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

3

Thursday, October 21st 2010, 2:51pm

Hi Jesse,

I have tried to found something wrong on your code but it seems to be correct... only a <br> that should be erased:

Source code

2
.....if(step == 6, wait(1); inc(step); );<br>.....


Can you provide a link ?

SAlut.

4

Thursday, October 21st 2010, 2:59pm

Hi Jesse,

I have tried to found something wrong on your code but it seems to be correct... only a <br> that should be erased:

Source code

2
.....if(step == 6, wait(1); inc(step); );<br>.....


Can you provide a link ?

SAlut.


Ah, don't mind the <br>. It's not part of the original code. Tried to clean up the code after attaching it here with breaks but didn't work. I knew i forgot one of them in there.

Will upload the tour on server tomorrow and will post the link. Im 100% sure that the code is correct because it was working before just fine. Now, it's not. Why, no idea.

Regards,
Jesse
Jesse Passoja
Passoja design
www.passojadesign.com

VN2009

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

5

Thursday, October 21st 2010, 4:07pm

try an older version of krpano.swf. i had an old tour break also. something to do with changing the urls with the onover and onout. it used to work then it broke without changing any code. i ended up changing the way the actions were used to get around it but klaus had chimed in saying they way some of the actions, tweens and such are handled in a different way in the newer versions. proably just a timing thing.

6

Thursday, October 21st 2010, 5:02pm

Have you tried putting the intro2.XML into step8 to see if maybe it is the cause instead of the code posted here?

Just a thought?

7

Friday, October 22nd 2010, 7:26am

Thanks for the replies!

@VN2009 Tried with older version .swf. Didn't work.
@Jarredja, Tried what you suggested. It loaded the tour just fine. Maybe i need to re export the thing and code again.

Will provide a link to the tour in a bit. Works internet is on slow mood today so uploading will take some time. Will edit this post for it.

Ok, here is the link: http://inelike.fi/wp-content/virtuaaliki…tour/intro.html

If you want to see the whole tour which this is just a part, here:

http://inelike.fi/wp-content/virtuaaliki…tour/index.html

first page is small introduction and from the two red buttons you can choose will you see the introduction or you want to go around yourself.

"Katso esittely!" = Watch the introduction, "Tutustu kartanoon." = Check the manor.
Jesse Passoja
Passoja design
www.passojadesign.com

This post has been edited 1 times, last edit by "Nelike imagery" (Oct 22nd 2010, 8:58am)


michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

8

Friday, October 22nd 2010, 10:59am

Hi Jesse,

I think the problem comes from some of your lookto() that have inside the smooth(accel,break,maxspeed) values as 0....
if(step == 15, lookto(77,8,90,smooth(3,0,15)); inc(step); );

Check all your lines... there is more like this one ;-) ...
Hope this help....

SAlut.

9

Friday, October 22nd 2010, 11:10am

Hi Jesse,

I think the problem comes from some of your lookto() that have inside the smooth(accel,break,maxspeed) values as 0....
if(step == 15, lookto(77,8,90,smooth(3,0,15)); inc(step); );

Check all your lines... there is more like this one ;-) ...
Hope this help....

SAlut.


Hi,

There are some like that because on those spots i don't want the tour to stop. As you can see it has break = 0 and the next one has accel = 0, meaning it will just pass through the point.

This is like that because i wanted the tour to first look to right
if(step == 15, lookto(77,8,90,smooth(3,0,15)); inc(step); );

Then far left
if(step == 18, lookto(-110,8,90,smooth(0,-3,15)); inc(step); );

But when i put the code directly like this, it didn't go from right to left again. It continued to right till this -110 point. That's why i added line:
if(step == 17, lookto(1,0,90,smooth(3,0,15)); inc(step); );
Now the tour go from right to this point, pass the point without breaking or accelerating and go to far left.

I will go through the code again and see my mistakes. Started to find some now. Like, why there is step 16, wait. It shouldn't be there to make my theory work :D Thanks for the reply!

Regards,
Jesse
Jesse Passoja
Passoja design
www.passojadesign.com

10

Friday, October 22nd 2010, 11:18am

Ok Michel. Tried putting values on the breaks and accels. WORKS! Now i need to find other way around to make the tour not stop on the middle way from right to left. Thanks a lot! *thumbsup*
Jesse Passoja
Passoja design
www.passojadesign.com