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!

  • 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.

  • 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*

  • Hi narad13,

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

    Code
    <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.

  • 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?

Participate now!

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