Is there a way to execute an action only 1 time when krpano initially loads?
What I'm trying to do is run some javascript to append the XML relative path on some plain HTML inside of a data element. So I'm using the value from krpano.network.firstxmlpath, and then with javascript I'm adding it to the existing SRC attribute in image tags with a certain CSS class. I'm using this method instead of the %FIRSTXML% placeholder because the placeholders don't work in plain HTML inside of a data element.
This all worked fine, right up to the point where I deploy my tour to a CDN. Because the XML is on the CDN and the HTML is on the web server, krpano hasn't finished it's output when my scripts are running. It's a mess, sometimes it works, sometimes not. So what I'd like to do is relocate the scripts to the XML. I can run them in an action with onloadcomplete, but the problem is that every time a new scene is loaded, they run again. I only want them to execute once, after the tour's 1st load.
I've tried to change the value of event[MyEvent].onloadcomplete within my action to a blank value (so it won't run again), but for some reason the value of onloadcomplete will not change.