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.

michel

Professional

  • "michel" started this thread

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

1

Monday, November 17th 2008, 9:38pm

movevectorx or hlookat_moveforce and Javascript

Hi
I'm looking to use movevectorx or hlookat_moveforce with javascript but i don't understand how it work...
I've made a function like this:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<script type="text/javascript">
// <![CDATA[
	function krpano()	{
         	return document.getElementById("krpanoSWFObject");
         	}
	
	function movevectorx()	{
             krpano().set( "movevectorx,+1" );
         	}
	
	function hlookat_moveforce()	{
         	krpano().set( "hlookat_moveforce,+1" );
         	}

	function moveto(toh, tov)	{
         	krpano().call( "moveto(" + toh +"," + tov + ")" );
         	}
// ]]>
</script> 

Only krpano() and moveto(toh, tov) are working...
Please, can you explain how to use this? What's the way hlookat_moveforce work?

Thanks, Michel.

2

Tuesday, November 18th 2008, 7:40am

Hi,

the set function needs two parameters:

Source code

1
set(variablename, value);


this code is correct: (note the apostrophes)

Source code

1
krpano().set("hlookat_moveforce", +1 );


best regards,
Klaus

michel

Professional

  • "michel" started this thread

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

3

Tuesday, November 18th 2008, 8:10am

movevectorx or hlookat_moveforce and Javascript

Thank you Klaus,

I'm going to try...

What's the difference about movevectorx and hlookat_moveforce ?

Michel

michel

Professional

  • "michel" started this thread

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

4

Tuesday, November 18th 2008, 10:03am

movevectorx or hlookat_moveforce and Javascript

Ok, the 2 variables movevectorx and hlookat_moveforce work the same way... But why there's to variable to do the same thing ? Is movevectorx going to be "removed" by the new hlookat_moveforce ?

5

Tuesday, November 18th 2008, 10:11pm

there are the same, both can be used,

movevectorx was the old name (versions < 1.0.7) and hlookat_moveforce is the new one,
(maybe movevectorx will be removed in future, but not sure),

I changed the names for better understanding and better relations,
e.g.
hlookat
and hlookat_moveforce (instead of hlookat and movevectorx)
vlookat and vlookat_moveforce (instead of vlookat and movevectory)
fov and fov_moveforce (instead of fov and movevectorz)

best regards,
Klaus