You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, December 22nd 2008, 12:47pm

Sound

Hi, Klaus

I put two button for sound, one "Sound" and one "Mute", but I can't stop the sound, have you any code please

2

Monday, December 22nd 2008, 3:44pm

Hi,

you need to use the new soundinterface.swf plugin,
it works different to the sound.swf plugin, but with it you can play and stop music,

for example:

include the plugin at top:

Source code

1
<plugin name="soundinterface" url="soundinterface.swf" />



code for the play button - "mymusik" is the internal ID/name of your musik:

Source code

1
2
3
<plugin name="playbutton" ....
       	onclick="playsound(mymusik,music.mp3);"
      	/>


and the code for the stop button - call stopsound with the internal ID/name:

Source code

1
2
3
<plugin name="stopbutton" ...
    	onclick="stopsound(mymusik);"
   	/>


best regards,
Klaus

3

Monday, December 22nd 2008, 4:04pm

Tank Klaus, but

I get a " loading "r #2032" failed"

4

Monday, December 22nd 2008, 4:13pm

was the path to mp3 file correct?

with the default settings the path is relative to the html file (in this beta),

but you can set a "rootpath" for the sound files,

e.g. - to search for the sound files in the path of the current xml file:

Source code

1
2
3
4
<plugin name="soundinterface" 
    	url="soundinterface.swf" 
    	rootpath="%CURRENTXML%"
   	/>

5

Monday, December 22nd 2008, 4:15pm

the path is "nav/jingle.mp3"

6

Monday, December 22nd 2008, 4:22pm

Oups.... !!!

all is right now and working well

Thank a lot Klaus :rolleyes:

7

Saturday, January 24th 2009, 4:15pm

Hi Klaus

I want a loop on my .mp3 it's possible ?

8

Sunday, January 25th 2009, 11:26pm

I get it
",loops" is ok after the music.mp3 *rolleyes*

9

Thursday, January 29th 2009, 2:50pm

Hi Klaus
When I put this code the music don't start all the time

Source code

1
<krpano version="1.0.8" onstart="action(load1);playsound(mymusik,musique/kevzik.mp3,loops);">


I put a wait blend and is ok

Source code

1
<krpano version="1.0.8" onstart="action(load1); wait(blend); playsound(mymusik,musique/kevzik.mp3,loops);">


It's normal or a bug?

10

Thursday, January 29th 2009, 7:40pm

Hi,

no, it's not a bug

the reason why playsound() doesn't work in onstart is that the soundinterface.swf plugin
must be loaded first! and this is not guaranteed in onstart!

the correct solution is to call the playsound() not in "onstart" but in the "onloaded" event
of the soundinterface plugin,

e.g.

Source code

1
2
3
4
<plugin ... url="soundinterface.swf" 
        ...
        onloaded="playsound(...);" 
        />


best regards,
Klaus

11

Thursday, January 29th 2009, 9:00pm

okay Klaus

thanks for this *thumbsup*