• Hello,
    I am beginner: I have get to play a background sound in my vtour, but I cannot get to show and use a button on/off fo sound like it is in the examples of krpano.
    The code I am trying is:

    Code
    <!-- a button to pause/play the sound -->
    	<layer name="snd" url="soundonoff.png" align="leftbottom" x="10" y="10" alpha="0.25" scale="0.5" onover="tween(alpha,1);" onout="tween(alpha,0.25);"
    	       crop="0|0|50|50"
    	       onclick="pausesoundtoggle(bgsnd); switch(crop, 0|0|50|50, 0|50|50|50);"
    	       />


    adn this is the xml I have write:


    Has anybody any idea of where is the problem?
    Thnak a lot.

    Edited once, last by aferferro (January 27, 2022 at 8:08 AM).

  • Hi,

    add keep="true" to the layer of the button to avoid that it get removed:

    Code
    <layer name="snd" ... keep="true" ...

    And in the playsound call use 'bgsnd' instead of 'auto':

    Code
    playsound('auto',sound/blur.mp3);

    Otherwise the

    Code
    pausesoundtoggle(bgsnd)

    call will not work.

    Best regards,
    Klaus

Participate now!

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