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

Wednesday, March 4th 2009, 10:15pm

Sound Interface Plugin (Beta)

A new Sound Plugin - soundinterface.swf
  • this plugin adds functions to play and controls sounds direct from the xml.
  • only this one plugin must be loaded for all sound.
  • note - the functions are not available until the plugin was loaded use the plugin onloaded event or the preload="true" plugin setting to verify that!

Download latest plugin version:

Included in the latest krpano viewer download package

Examples:
Directional Sound


Usage:

Source code

1
2
3
4
5
<plugin name="soundinterface"
        url="soundinterface.swf"
        onloaded="action(preloadsounds);"
        rootpath="."
        />


Attributes:
  • onloaded
    • this action is called when the plugin was loaded and is ready for use.
    • can be used for preloading sound.
  • rootpath
    • root path of the sound files
    • relative from the xml file, default=""
    • with krpano 1.0.8 or higher it's possible to use placeholders like %SWFPATH% here
  • volume
    • set the global volume for all sounds
    • 0.0 - 1.0, default=1.0
    • can be changed dynamically via actions (set/tween/...)
  • mute
    • set the global mute for all sounds
    • true or false, default=false
    • can be changed dynamically via actions (set/switch/...)



Functions:
  • preloadsound(mp3file);
    • preloads a sound file
    • this can be used to reduce the latency when starting play
    • mp3file = the filename/path of a sound file
  • playsound(id, mp3file, loops*, oncomplete*);
    • plays a sound file
    • id = id/name of the sound (use "auto" for a automatic new id for every play)
    • mp3file = the filename/path of a sound file
    • loops = number of loops, 0=endless, default=1 (*optional)
    • oncomplete = action/event that will called on complete (*optional)
  • playsound2D(id, mp3file, volume*, pan*, loops*, oncomplete*);
    • plays a sound file with adjustable volume and panning
    • id = id/name of the sound (use "auto" for a automatic new id for every play)
    • mp3file = the filename/path of a sound file
    • volume = sound volume (0.0 - 1.0, default=1.0) (*optional)
    • pan = left/right panning (-1.0(=left) - +1.0(=right), default=0.0) (*optional)
    • loops = number of loops, 0=endless, default=1 (*optional)
    • oncomplete = action/event that will called on complete (*optional)
  • 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)
  • playsound3DHS(id, mp3file, hotspotname, range*, volume*, loops*, oncomplete*);
    • plays a directional 3D sound at a hotspot position
    • it follows the hotspot if the hotspot is moving
    • id = id/name of the sound (use "auto" for a automatic new id for every play)
    • mp3file = the filename/path of a sound file
    • hotspotname = name of the hotspot
    • 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)
  • pausesound(id);- pauses a sound
    • id = id/name of the sound
  • resumesound(id);- resumes a paused sound
    • id = id/name of the sound
  • pausesoundtoggle(id);- pauses OR resumes a sound
    • id = id/name of the sound
  • stopsound(id);- stops playing a sound
    • id = id/name of the sound
  • stopallsounds();
    • stop all current playing sounds


XML usage example:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<plugin name=soundinterface" 
        url="plugins/soundinterface.swf" 
        rootpath="sounds/" 
        />

<hotspot name="s1" url="spot.png"
         onclick="playsound(auto,tada.mp3);"
         onover="playsound(auto,over.mp3);"
         onout="playsound(auto,out.mp3);"
         />
<hotspot name="s2" url="spot.png"
         onclick="stopallsounds();
                  loadpano(next.xml,null,MERGE,BLEND(1));
                  playsound(auto,newsound.mp3);"
         />

2

Sunday, January 10th 2010, 11:18am

krpano V1.0.8 beta 9 ??

Hallo Klaus,

ich habe mir das neue Interface geladen und nun bekomme ich die Meldung, dass ich mindestens krpano V1.0.8 beta 9 benötige.

Wo gibt's diese denn zum Download? Ich habe nur die beta 8 gefunden ... *confused*

Vielen Dank!!

Sepp
Virtuelle Rundgänge in den bayerischen Schlössern, Gärten und Seen: http://www.schloesser-bayern.com

3

Sunday, January 10th 2010, 11:24am

Hallo Klaus,

mea culpa. die swf beta 9 ist natürlich bei den Tools dabei. Sorry.

Viele Grüße

Sepp
Virtuelle Rundgänge in den bayerischen Schlössern, Gärten und Seen: http://www.schloesser-bayern.com

4

Thursday, December 30th 2010, 4:33pm

Läuft das ganze auch auf dem iPad?

Gruß rPano

5

Tuesday, January 18th 2011, 2:49pm

Gibt es hierzu schon etwas neues?

Gruß Ronny