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.

    Cheers,
    Vaans

  • 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);
    </action>

    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.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!