You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, November 11th 2009, 1:42pm

Setting a preview image via a JavaScript call

Hi,

I'm working on a application where Panos are being called through JS.

call("loadpano(null,sphere=folder/SPHERE.jpg,keepbase,blend(1));");

I want to set a preview image while the main pano loads. I know this can be done via XML, however due to constraints, I need to call it from JS.

Is this possible?

Many thanks,
Michael

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

2

Wednesday, November 11th 2009, 3:03pm

Hi,

I have tried some about your request....
It fact more than one parameters can be set at once:

Source code

1
call("loadpano(null,preview=preview.jpg&sphere=pano.jpg,MERGE,blend(1));");


Only for the little story *smile* ... At first I was not able to set the preview... so I used the possibility to set some actions for do a delayedcall to the pano.... like this:
loadpano(xmlpath,parameters,flags,blend,more_actions)

Source code

1
call("loadpano(null,sphere=preview.jpg,MERGE,blend(1));delayedcall(3, loadpano(null,sphere=pano.jpg,MERGE,blend(1)); );");


SAlut.

3

Wednesday, November 11th 2009, 3:17pm

Salut Michel et merci bien pour ton réponse rapide !

It's working exactly as I needed it. :-)