How to fade sound in and out with a tween

  • Hello, I am wondering how to put a fade effect on a background sound with a tween, so that the sound fades in at the start of a panorama and out at the end, can anybody please help me?
    Do I add something to this sound interface code at the beginning of the .xml?


    <plugin name="soundinterface"
    url.flash="plugins/soundinterface.swf"
    url.html5="plugins/soundinterface.js"
    preload="true"
    rootpath=""
    volume="1.0"
    mute="false"
    />

    Or do I put something in each panorama in the tour, here:


    <events name="currentpano"
    onnewpano="playsound (bgsnd, 'sounds/*.WAV', 0;"
    onremovepano="stopsound(bgsnd, 'sounds/*.WAV', 0;"
    />

    Any help much appreciated - I have seen a previous thread on this question, but I still don't quite understand.
    I am looking to match the visual effect of a fading colourblend blendmode I am using, and to ease the sound in and out of each panorama in the tour.
    Cheers!
    Dan

Participate now!

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