JS get krpanoSWFObject for null problem

JS get krpanoSWFObject for null problem

Sometimes, we need a JS interface control in HTML through the KRPano KRPano some attribute of an element, or invoke some ACTION, some friends will experience problems with krpano object is null.

General error message are as follows:

 

This is because the krpano object is called when there are no initialization is done cause.

This problem can be solved by official recommended the OnReady event.

Code is as follows:

embedpano({target:"krpanoDIV", onready:krpanoReady});

function krpanoReady(krpano)
{
    krpano.call("trace(krpano is ready...)");
}

 

This post was published on: http://www. krpano. tech/archives/445

Posted by: dragon slayer

Reprinted please specify the source, thank you!