on hover? on click?

  • Hi
    I have an overlay on a pano where I'd like the user to be able to hear some audio when hovering, then go to another scene when s/he clicks

    This is what I've used:

    onhover="stopallsounds();playsound(auto,sounds/2dante.mp3|2dante.ogg);"
    onclick="loadscene('scene_1',null,MERGE,BLEND(1));"

    but it only plays the audio when clicked and does not go the next scene - what am I doing wrong? (Mac desktop, initially)

    thanks

    JL

  • attribute name full variable name type default value

    onover

    layer[name].onover

    Action Event

    Actions / functions that will be called when the mouse moves over the layer/plugin element.
    attribute name full variable name type default value

    ===================================================================================================
    onhover

    layer[name].onhover

    Action Event


    Actions / functions that will be called in intervals (15 times per second) when the mouse stays over / hovers the layer/plugin element.

    ==================================================================

    Try onover

  • Hello Jarredja

    When in doubt remove the 'h', and it works!

    I should have said that I was using a hotspot with a text layer. I've changed it to a layer but I'm not at all clear as to the difference between hotspots, layers and plugins as yet, they seem to be interchangeable. This L curve is a steep climb but worthwhile.
    Now I'd like to limit the audio to a single 'play' - will work on it...

    best wishes

    JL

  • Concerning differences between hotspots, layers and plugins: hotspots are located inside the panorama and aligned in panoramic coordinates, whereas layers/plugins are located on the screen area and aligned to its width/height and x/y.

    What about playing the sound just once, try this code:

    Code
    playsound(auto,sounds/2dante.mp3|2dante.ogg,1);

    value "1" in the end means that the sound must be played just once. If you need it to be played in loops, place "0".

    See here for more details:

    http://www.krpano.com/plugins/soundinterface/#actions

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!