You are not logged in.


Wednesday, April 23rd 2014, 12:07pm

KRPano object cannot find Javascript Interface function "set,get,call" ?

็Hello there, I'm new here and to KRPano also. Have been researching it for a few weeks and there are a lot of things I have a problem with :(

First of all, when I use the function "embedpano();" and set "html5" properties to "prefer". Everything works perfectly.

But after I change "html5" properties from "prefer" to "auto", in order to make the Flash side works with changing cursors icon, KRPano object cannot find set(), get(), or call() as it was used to be? *confused*

The problem is I want to change cursor icon into some images but when I set "html5" as "prefer" in embedpano(), it didn't work. But when I change from "prefer" to "auto", the cursor change into my image but they cannot call the following method anymore?

Does anyone have a solution for this problem? Your help will be really appreciated here :(


Wednesday, April 23rd 2014, 12:27pm

Changing the cursor works for flash only, at this moment.


Wednesday, April 23rd 2014, 1:17pm


are you testing locally? (on file:// urls?)

If yes, please be aware about the local Flashplayer restrictions:

I would recommend using the krpano Testing Server for local testing:
New Tool: krpano Testing Server

Best regards,


Thursday, April 24th 2014, 3:24am

So it means that at this time, it is impossible to implement both Javascript interface when using Flash right? *sad*


Thursday, April 24th 2014, 7:51am

No, that doesn't mean that!

It means when running the Flashplayer with local content (file:// urls), the Flashplayer will restrict the usage of external interfaces (like the Javascript interface) for security reasons. When running the same content online (on http:// urls), there are no restrictions.

A way to bypass this restrictions is to change either the Flashplayer security settings or to use a localhost server for local testing. Please see the links from the previous post for details.

Best regards,


Thursday, April 24th 2014, 9:00am

OK, I think, after review what you provided me, I understand what you said. However, I already try both method. But looks like it still cannot find Javascript Interface...

Let me explain, at first before posting in this forum, I develop this application via Visual Studio 2010, so I assume that when it was run via localhost:xxxx, it just like open in URL server, but the problem occured.

Next I follow the method how to set "Global Security Settings" for flash as in your first link, but still not working....

Then, I try to use KRPano testing server as you provide how to. I think it is just the same as when I run it via Visual Studio. But it still doesn't work either. It still cannot find Javascript Interface....

What I only do is put <cursors> in xml file to change the cursors icon, try calling KRPano.set( ); via javascript, and when using "embedPano();" to start KRPano viewer, I just set "html5" as "auto" because "prefer" cannot use the flash-only thing like "<cursor>" , What else do I miss or am incorrect here? *confused*

Edit : To understand more easily what I'm facing here, I already prepared a sample to test. In embedPano() please change the properties of "html5" between "auto" and "prefer" to see the different

This post has been edited 1 times, last edit by "Woramin" (Apr 24th 2014, 9:23am)


Thursday, April 24th 2014, 1:21pm


I have downloaded your example and it the Javascript Interface is working fine there...

But instead of using a 3 second timeout for getting the krpano object, I would recommend better using the 'onready' event:

Regarding custom cursors - they are currently only supported in Flash.

Best regards,


Friday, April 25th 2014, 3:44am

But then, the problem in this sample is....

- If I set "html5" in embedPano( ) to "prefer", the Javascript Interface will work fine, but the custom cursors of Flash doesn't work.
- If I set "html5" in embedPano( ) to "auto" , the Javascript Interface won't work here, but the custom cursors of Flash works fine instead.

Is there anyway that I can use Javascript Interface in the same time that I want to use some of the Flash-only compatibility like Custom Cursor?


Tuesday, April 29th 2014, 10:49am


are you using the krpano Testing server for testing this?

If yes, then the Javascript interface will work in both cases.

Best regards,


Tuesday, April 29th 2014, 12:15pm

Yes, I already used it.

But if I set "html5" in "embedPano( )" as "auto" to utilize Flash functionality, the JS interface doesn't work *sad*


Tuesday, April 29th 2014, 1:09pm

Can you show a link to your pano?

Something must be very wrong when the Javascript interface wouldn't work in Flash there...


Wednesday, April 30th 2014, 9:16am

Sorry for bothering you. Looks like it is my fault here, but I can make it works now *smile*

I just tried using "onready" event as you suggested and Javascript interface is now functional. Now everything I want can be done.

Thanks you for you great help here.

By the way, this might be another question after I use onready event.

I don't know why when I used get( ) function to get the data from tag <data> I included in the xml, it returned obj differently

In embedPano( ), if I set HTML5 as "auto", I get something like this

But if I set HTML5 as "prefer", it returned something like this instead??

I, however, still can retrieve the data tag from this one, but I need to write additional lines of code to check how it returned object. Is there any reason behind this??


Wednesday, April 30th 2014, 2:41pm


what you see there are some internal properties of these objects, these should not be used or changed in any way. They don't need to be the same in Flash and HTML5 and can also vary or change between different krpano versions.

In the case of Flash, you don't get the real object from Flash - you get only a 'serialized' copy/rebuild of it.

Just use only the properties/attributes from the xml reference:

E.g. instead of getting the whole internal data object via - get("data[name]") - get only the data content via - get("data[name].content").

Best regards,


Tuesday, May 6th 2014, 3:49am

Sorry for the late response because of my consecutive holidays

For your suggestion to use "get("data[name]") " is really worked. Now I don't have to check whether how the object will have inside.

Actually, I have a few more questions to ask you about KRPano but because of I have been moved to work in other projects now, so I will leave those questions to ask later.

By the way, thank you very much for your help until this time *smile*