Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Sonntag, 4. Oktober 2009, 10:20

How do I know if panorama is fully loaded and ready to use from javascript?

I can use things like krpano().call(...) assigned to some HTML buttons and it works perfectly. But if I try it from window.onload, I have a javascript error:krpano().call is not a function.
I could have used a few seconds delay before calling krpano() functions, but it is not really cool. Any ideas how can I check whenever krpanoSWFObject is ready to manipulate without causing javascript errors?

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »nmakarov« (4. Oktober 2009, 10:57)


2

Montag, 5. Oktober 2009, 11:47

Hi,

one way would be to check in JS if the krpano object and the function are available:

js:

Quellcode

1
2
3
4
if (krpano && krpano.call)
{
...
}



or a other way - use a kind of 'start' javascript function and call it from krpano,

js:

Quellcode

1
2
3
4
function krpano_is_ready()
{
...
}

xml:

Quellcode

1
2
<krpano onstart="js( krpano_is_ready() );">
...


best regards,
Klaus

3

Dienstag, 6. Oktober 2009, 00:22

Thanks, Klaus.