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.

bg360

Trainee

  • "bg360" started this thread

Posts: 93

Location: Bulgaria

  • Send private message

1

Tuesday, September 14th 2010, 2:34pm

how to call action ?

Hi,
I found out how to change lookto from HTML through Javascript.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<script type="text/javascript">
// <![CDATA[

function krpano() 
{
return document.getElementById("krpanoSWFObject");
}

function lookto(toh, tov, fov)
{
krpano().call( "lookto(" + toh +"," + tov + "," + fov + ")" );
}

// ]]>
</script>


but what how to call from HTML action which is in my XML file?

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

2

Tuesday, September 14th 2010, 3:31pm

Hibg360,

Quoted

but what how to call from HTML action which is in my XML file?
The same way... calling your custom action as you already do:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<script type="text/javascript">
// <![CDATA[

function krpano() 
{
return document.getElementById("krpanoSWFObject");
}

function Custom()
{
krpano().call( "custom_action_in_xml()" );
}

// ]]>
</script>


Hope this help...

SAlut.

bg360

Trainee

  • "bg360" started this thread

Posts: 93

Location: Bulgaria

  • Send private message

3

Tuesday, September 14th 2010, 6:15pm

Thank you Michel!
| think that I tried something like this...
I'll give a try again.

bg360

Trainee

  • "bg360" started this thread

Posts: 93

Location: Bulgaria

  • Send private message

4

Tuesday, September 14th 2010, 6:41pm

Yes, it worx!
the problem was in onclick="" i didn't enter the right name of action

Similar threads