I get the png showing, but no sound. Is it possible to load a sound file in the image gallery. I have moved the code around and can't get it to load the file although I get no other errors.
Also can I force it download the entire file before playing instead of streaming with starts and stops?
I think the problem is here since I'm not opening a pano
<!-- start playing the sound -->
<events name="currentpano"
onnewpano="playsound(bgsnd, 'ldc.mp3', 0);"
onremovepano="stopsound(bgsnd);"
/>
I also tried
<action name="play">
playsound(sound,ldc.mp3,loops = 0);
</action>
here is the existing xml file.
<!--
krpano
- a xml driven image gallery example
- click a small image to view it large
-->
<krpano onstart="start();">
<!-- use only a grid preview pano (to save download space) -->
<preview type="grid(cube,2,1,256,0x000000,0x000000,0x222222);" details="16" />
<view limitview="lookat" vlookatmin="0" vlookatmax="0" />
<!-- include image thumbbar xml script code -->
<include url="thumbbar.xml" />
<action name="start">
<!--
syntax:
create_thumbbar(numberofimages, align, orientation, x,y, width,height, border);
numberofimages ... number of images
align ... position of the imagebar (lefttop,left,leftright,top,center,bottom,righttop,right,bottom)
orientation ... orientation of the imagebar (h or v)
x,y ... position offsets
width,height ... thumbnail imagesize
border ... border around images
-->
create_thumbbar(7, left, v, 10,10, 90,60, 6);
thumbbar_addimage('images/KA_009.jpg');
thumbbar_addimage('images/KA_010.jpg');
thumbbar_addimage('images/KA_011.jpg');
thumbbar_addimage('images/KA_012.jpg');
thumbbar_addimage('images/KA_013.jpg');
thumbbar_addimage('images/KA_014.jpg');
thumbbar_addimage('images/KA_015.jpg');
</action>
<!-- load the soundinterface plugin -->
<plugin name="soundinterface"
url="plugins/soundinterface.swf"
alturl="plugins/soundinterface.js"
rootpath=""
preload="true"
keep="true"
/>
<!-- start playing the sound -->
<events name="currentpano"
onnewpano="playsound(bgsnd, 'ldc.mp3', 0);"
onremovepano="stopsound(bgsnd);"
/>
<!-- button to pause the sound: -->
<plugin 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"
onloaded="if(ismobile,set(scale,1));"
onclick="pausesoundtoggle(bgsnd); switch(crop, 0|0|50|50, 0|50|50|50);"
/>
</krpano>