Hi all,
I am trying to call a javascript function from anywhere in xml code without defining an Action and I want that function to have access to the krpano interface.
Here is an example:
Javascript code:
Xml code:
Code
<layer name="mylayer" onloaded="myfunctionaction()" type="container" keep="true" width="100" height="100" align="center" bgalpha="1" />
<action name="myfunctionaction" type="Javascript">
<![CDATA[
myjsfunction(krpano);
]]>
</action>
I wish to get rid of the Action and do something like that:
Code
<layer name="mylayer" onloaded="js(myjsfunction(???))" type="container" keep="true" width="100" height="100" align="center" bgalpha="1" />
How can I pass the krpano interface to the javascript function when using js() to call it?
Best regards,
Antoine