xml:and "try to set a call back to js? "
|
|
Quellcode |
1 |
<events onloadcomplete='js( your_js_function() );'/> " |
|
|
Quellcode |
1 2 3 4 |
function your_js_function()
{
...
}
|
html/js:trying to do "using the js-interface and try to set a xml function?
|
|
Quellcode |
1 |
krpano().set("events.onloadcomplete", "hideprogressbar()");
|
just:How can we get a even to javascript class where all images are loaded
|
|
Quellcode |
1 |
<events onloadcomplete="js( js_onloadcomplete() );" /> |
|
|
Quellcode |
1 2 3 4 |
function js_onloadcomplete()
{
...
}
|
That code doesn't make any sense - should the events call their-self again? That should result in an end-less loop... (which should be automatically stopped after some time when the limit of actions will be reached).<events onmousedown="set(syncother,true);" onmousewheel="events.onmousedown();" onloadcomplete="events.onloadcomplete()" onloaddone="events.onloaddone()" onxmlcomplete="events.onxmlcomplete()" />
|
|
Quellcode |
1 2 3 |
krpano.call("loadxml(" + escape(generateXML(true)) + ")");"
function generateXML(flag) { var xmlString = " loadscene(get(scene[0].name), null, MERGE); set(isFlag,+this.flag+); " return xmlString;}
|
|
|
Quellcode |
1 |
viewer = createPanoViewer({ swf: "pano.swf", id: "krpano", xml: xmlPath, target: container, width: width, height: height }); viewer.addParam("wmode", "transparent"); // viewer.call("loadxml(" + escape(generateXML(true)) + ")");" ------------ this line gives error
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 |
function test()
{
...
krpano.set("mycallback", function()
{
console.log("done...");
});
krpano.call("loadxml(...); mycallback();");
}
|