You are not logged in.

fellipe

Trainee

  • "fellipe" started this thread

Posts: 67

Location: Brazil

Occupation: Photographer

  • Send private message

1

Monday, June 14th 2010, 6:47pm

autorotate after load complete?

Can I allow the autorotate to start only when the panorama is loaded?

Tuur

Sage

Posts: 3,839

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

2

Monday, June 14th 2010, 6:53pm

Do you want the visitor to control the autorotate aswell?
Do you have a button for that?

Tuur *thumbsup*

fellipe

Trainee

  • "fellipe" started this thread

Posts: 67

Location: Brazil

Occupation: Photographer

  • Send private message

3

Monday, June 14th 2010, 6:58pm

no need of a button Tuur.
Just an "auto" autorotate but I"d like it to start after the panorama is loaded.

Tuur

Sage

Posts: 3,839

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

4

Monday, June 14th 2010, 7:05pm

well, you can do something like this..

Source code

1
2
3
4
5
6
7
8
9
10
<action name="load1">

   
    	       loadpano(1.xml,null,MERGE,BLEND(1));
		
                wait(load);
               wait(blend);
               wait(2);
    	       set(autorotate.enabled, true);
	</action>

but you can do that set(autorotate.enabled, true); also do in the moveto action or where ever..

maybe onloaded

or make an action autorotate start..

Cheers

Tuur *thumbsup*

This post has been edited 1 times, last edit by "Tuur" (Jun 14th 2010, 7:17pm)


fellipe

Trainee

  • "fellipe" started this thread

Posts: 67

Location: Brazil

Occupation: Photographer

  • Send private message

5

Monday, June 14th 2010, 7:09pm

Sorry Tuur, I did not understand :( I'm a newbie xml user yet

I'm using this code:

<autorotate enabled="true"
waittime="2.0"
accel="1.5"
speed="3"
horizon="20"
tofov="120"
/>

What should I do?

Tuur

Sage

Posts: 3,839

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

VN2009

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

7

Monday, June 14th 2010, 9:18pm

Felipe use the same code, set autorotate to false. then use onloadcomplete="wait(2); set(autorotate.enabled,true)"

Tuur

Sage

Posts: 3,839

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

9

Tuesday, June 15th 2010, 10:50am

Hi,

you could also use the "onloadcomplete" event,

e.g.

Source code

1
<events onloadcomplete="set(autorotate.enabled,true);" />


best regards,
Klaus

10

Friday, July 9th 2010, 7:47am

Thanks a lot!

I'm a complete newbie and this is exactly what I was looking for. Got everything managed so far (more or less) with the help offered in this forum (great job and great people here!).

There was only one small problem left. When I inserted auto-rotation, it started before the pano was loaded completely.

Inserted your code and now auto-rotation starts when loading is complete *smile*

I really appreciate the help given. Dealing with xml-files and Java-script is really hard for someone only having knowledge in html and php...

*thumbup*

DorinDXN

Trainee

Posts: 113

Location: Timisoara, Romania

  • Send private message

11

Tuesday, October 12th 2010, 12:02pm

Hi Klaus, can I read some "load_complete" status via javascript?

I don't want to produce again 6500+ panos and introduce onloadcomplete event.

If not, as I have "files_loaded" variable defined and used in the already produced .swf's

can I read that via javascript?



thanks,

Dorin

www.livepanoramas.com

12

Wednesday, October 13th 2010, 1:38pm

Hi,

you could add a javascript callback during the flash embedding in the html,
e.g.

Source code

1
2
3
4
5
6
7
8
9
var swf = createswf("krpano.swf", "krpanoSWFObject", "100%", "100%");
swf.addVariable("xml", "krpano.xml");
swf.addVariable("events.onloadcomplete", "js( jsloadcomplete() );");
swf.embed("krpanoDIV");

function jsloadcomplete()
{
...
}


or get/read out any variable by using the javascript get interface,
e.g. when you have a 'files_loaded' variable defined in the xml:

Source code

1
2
3
4
5
var krpano = document.getElementById("krpanoSWFObject");
if (krpano && krpano.get)
{
  var files_loaded = krpano.get("files_loaded");
}


best regards,
Klaus

DorinDXN

Trainee

Posts: 113

Location: Timisoara, Romania

  • Send private message

13

Thursday, October 14th 2010, 7:17pm

Thank you very much!



best regards,

Dorin

www.livepanoramas.com