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

Thursday, October 15th 2009, 5:23pm

Directional sound loop?

I have two sounds that I want to play continually with no action required to start them.
Could anyone help me with the code to make these loop?
Here is what I have:
<plugin name="soundinterface" url="plugins/soundinterface.swf" onloaded="playsound3D(s1,water.mp3, 0,0); playsound3D(s2,forest.mp3, 180,0, 120);" />

This works, but just doesn't loop...
Thanks!

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

2

Thursday, October 15th 2009, 5:44pm

Hi narad13,


There are a few more parameters to the playsound3D () as you can see in the doc:
  • playsound3D(id, mp3file, ath, atv, range*, volume*, loops*, oncomplete*);
    • plays a directional 3D sound
    • id = id/name of the sound (use "auto" for a automatic new id for every play)
    • mp3file = the filename/path of a sound file
    • ath = horizontal sound source position (-180 .. 180°)
    • atv = vertical sound source position (-90 .. +90°)
    • range = range of sound (in degrees, default=90) (*optional)
    • volume = sound volume (0.0 - 1.0, default=1.0) (*optional)
    • loops = number of loops, 0=endless, default=1 (*optional)
    • oncomplete = action/event that will called on complete (*optional)
Salut.

3

Thursday, October 15th 2009, 5:53pm

Michel,
Thanks for your reply. I also found this reference after I made my post. I am still uncertain about what this should look like in my code because nothing I am trying seems to work.
Should it be:
<plugin name="soundinterface" url="plugins/soundinterface.swf" onloaded="playsound3D(s2,forest.mp3, 180,0, 120,0);" />
or do I need to reference the function like:
<plugin name="soundinterface" url="plugins/soundinterface.swf" onloaded="playsound3D(s2,forest.mp3, 180,0, 120,loops0);" />

Sorry...just trying to learn XML syntax *confused*

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

4

Thursday, October 15th 2009, 6:22pm

Hi narad13,

I have not tried but I think this would be the correct code:

Source code

1
<plugin name="soundinterface" url="plugins/soundinterface.swf" onloaded="playsound3D(s2,forest.mp3, 180,0, 120,,0);" />


The corresponding value for each parameters in this example would be:
id = s2
mp3file = forest.mp3
ath = 180
atv = 0
range* = 120
volume* = no value (so default value)
loops* = 0 (so endless)
oncomplete* = no value

Salut.

5

Thursday, October 15th 2009, 6:29pm

Ahhh, this is starting to make sense now.
So I need to indicate a placeholder (,,) for the unchanged values in order for Flash to know what value the loop is when it gets there.
I am finding though that I need to put an actual value in fro the volume or it does not work. But I also realized that I am working with a pano that is built on krPano 7.0. Do I need to rebuild this in beta version 8.0 for it to work properly?

6

Thursday, October 15th 2009, 7:07pm

I have decided to rebuild the tour in version 8.0 anyways, for other reasons.
Thanks so much for your help!