You are not logged in.

Dear visitor, welcome to 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.



  • "Vaans" started this thread

Posts: 1

Location: The Netherlands

Occupation: Photgrapher

  • Send private message


Wednesday, December 29th 2010, 10:51am

Changing url depending on fullscreen or not

Hi all,

I've been searching for an answer on my problem but didn't find one, so I'll try to pop the question here.

I've created a panorama with hotspots to images. Since the panorama starts in a 600x400 screen I need the images to be small at the loading of the panorama, but in fullscreen mode I want the images to be bigger.
So far I managed to do so by replacing the urls in the events onenterfullscreen and onexitfullscreen. This works like a charm.
But since I have multiple scenes in the panorama this will only work in the scene where I switch to fullscreen. Whenever I'm in fullscreen mode and hop to a second scene, the statements in the event onenterfullscreen will (of course) not be performed, and the small images will be shown in the second scene.

Is there different event which I can use for this? Or should I write some code based upon the parameter fullscreen?
Any help would be much appreciated.




Posts: 277

Location: Kobyłka, Poland

Occupation: Virtual Tours - Spherical Panoramas - Krpano developer

  • Send private message


Wednesday, December 29th 2010, 12:53pm

You should set a variable storing correct path (url) on enter and exit fullscreen, and than use it in your action. Even if you will load new pano, the variable still be set correctly.

You can also test fullscreen mode in your action to showing pictures, and create url dynamically. Something like this:

<action name="showPic",">
if (fullscreen, set(path, 'images/highres/'), set(path, 'images/lowres'));
textadd(path, %1);

if you call this action like this: showPic(house.jpg), you will get path "images/highres/home.jpg" (if fullscreen is on) and "images/lowes/home.jpg" (if fullscreen is off)

This is an idea of corse, not complete code.

Similar threads