Hi,
I'm calling pano files via Javascript.
root.call("loadpano(base.xml,sphere=folder/images.jpeg+".jpg,MERGE,blend(1));");
Can I somehow call a custom function 'onLoadComplete'?
Many thanks,
Michael
Hi,
I'm calling pano files via Javascript.
root.call("loadpano(base.xml,sphere=folder/images.jpeg+".jpg,MERGE,blend(1));");
Can I somehow call a custom function 'onLoadComplete'?
Many thanks,
Michael
Hi Michael,
First, I think your code above has some syntax error:
root.call("loadpano(base.xml,sphere=folder/images.jpeg+".jpg,MERGE,blend(1));");
Would be:
root.call("loadpano(base.xml,sphere=folder/images.jpeg,MERGE,blend(1));");
No?
About your request, I think it can be done like this:
root.call("loadpano(base.xml,sphere=folder/images.jpeg&events.onLoadComplete=SometingToDo(),MERGE,blend(1));");
I have not tried... but I thing it would be correct.
SAlut.
Hi Michel. Thanks for pointing the syntax error. The onLoadComplete call did not work.
Hi,
QuoteThe onLoadComplete call did not work
Strange... I have not tried to set events.onLoadComplete via Javascript... But I have tried as a variable passed in a url and it worked.... like this:
http://andorra360.com/panos/08/pal/krpano.swf?xml=pal.xml&events.onLoadComplete=moveto(300,15)
Is there a events.onLoadComplete defined into your base.xml file ? If so, perhaps the one in the xml erase the one set via Javascript...
Also, try using onxmlcomplete instead of onloadcomplete...
Tell me please..
Can you post a link to see ?
SAlut.
Hi.
You can see a sample at the following address:
http://www.virtualvisit-northernireland.com/preview/prototype2.html#merchant
On load you will see I'm trying to call a simple function called "loaded" with an alert.
Any ideas?
Michael
Hi,
I think the problem is in those lines:
root.call("loadpano(base.xml,sphere="+location_section+"/"+jpeg+".jpg&event.onLoadComplete=loaded(),MERGE,blend(1));");
Try this:
event.onLoadComplete=js(loaded())
root.call("loadpano(base.xml,sphere="+location_section+"/"+jpeg+".jpg&event.onLoadComplete=js(loaded()),MERGE,blend(1));");
SAlut,
Hi,
Also, event ---> events ....
root.call("loadpano(base.xml,sphere="+location_section+"/"+jpeg+".jpg&events.onLoadComplete=js(loaded()),MERGE,blend(1));");
edited: reference: <events>
SAlut.
Hi,
OK... you are using krpano 1.0.7.... events onloadcomplete come from 1.0.8 beta 6 !!!
Download it here: krpano 1.0.8 beta (Flash10, QTVR, Zoomify, Partials Panos, ...)
SAlut.
Don’t have an account yet? Register yourself now and be a part of our community!