oncomplete sound command

  • Hello all,

    Trying to get a distorted hotspot video to play after an initial background sound, I tried buffering the hotspot which seemed not to work,..now i am trying to create an action to change the pausedonstart from true to false upon completion of the initial sound. Having problems and not sure if my coding is correct as i could not find any oncomplete samples using the sound interface. Thanks.

    Rob

    <krpano version="1.0.8">
    <plugin name="soundinterface"
    url="soundinterface.swf"
    onloaded="action(preloadsounds);"
    preload="true" />

    <events onloadcomplete="plugin[combobox].selectitem(White Limo);playsound(1,toiletflushing.mp3,1,action(playvideo)"/>


    <panoview h="0" v="0" fov="90"/>
    <view fisheye="0" limitview="lookat" vlookatmin="-90" vlookatmax="90" fovmin="0.01" fovmax="179" fov="90" hlookat="0" vlookat="0"/>
    <progress showload="none"/>
    <autorotate horizon="0" tofov="90"/>
    <preview url="l2data/l20/preview.jpg"/>
    <image type="CUBE" multires="true" tilesize="720" baseindex="0">
    <level tiledimagewidth="1439" tiledimageheight="1439">
    <left url="l2data/l20/3/1/%v_%u.jpg"/>
    <front url="l2data/l20/0/1/%v_%u.jpg"/>
    <right url="l2data/l20/1/1/%v_%u.jpg"/>
    <back url="l2data/l20/2/1/%v_%u.jpg"/>
    <up url="l2data/l20/4/1/%v_%u.jpg"/>
    <down url="l2data/l20/5/1/%v_%u.jpg"/>
    </level>
    <level tiledimagewidth="720" tiledimageheight="720">
    <left url="l2data/l20/3/0/%v_%u.jpg"/>
    <front url="l2data/l20/0/0/%v_%u.jpg"/>
    <right url="l2data/l20/1/0/%v_%u.jpg"/>
    <back url="l2data/l20/2/0/%v_%u.jpg"/>
    <up url="l2data/l20/4/0/%v_%u.jpg"/>
    <down url="l2data/l20/5/0/%v_%u.jpg"/>
    </level>
    </image>
    <hotspot name="spot0" visible="true" pausedonstart="true" handcursor="false" url="l2data/graphics/videoplayer.swf" videourl="l2data/graphics/spots/spot0.flv" onclick="togglepause()" distorted="true" ath="99.4652" atv="-14.1652" width="247" height="151" rx="-12.712" ry="-10.4157" rz="1.72546"/>


    <action name="playvideo">set(hotspot[spot0].pausedonstart,false);</action>

    </krpano>

  • Hi rbackhaus,

    Code
    <events onloadcomplete="plugin[combobox].selectitem(White Limo);playsound(1,toiletflushing.mp3,1,hotspot[spot0].play());"/>

    This way, on playsound complete, you sends a play() action to the video hotspot...
    Your action playvideo() is not needed...
    pausedonstart="true" is needed to make the video hotspot paused when loaded...

    Have a look to both plugins references:

    SAlut.

    Edited once, last by michel (June 25, 2010 at 7:26 PM).

  • Michel,

    Thanks,....


    still not working,....does anything nee to go between the (),.... hotspot[spot0].play()"/

    first sound play then ends,...video spot does not start unless i click on it???????


    <events onloadcomplete="plugin[combobox].selectitem(White Limo);playsound(1,toiletflushing.mp3,1,hotspot[spot0].play()"/>

Participate now!

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