Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Mittwoch, 4. März 2009, 22:15

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:

Quellcode

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:

Quellcode

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

Sonntag, 10. Januar 2010, 11:18

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

Sonntag, 10. Januar 2010, 11:24

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

Donnerstag, 30. Dezember 2010, 16:33

Läuft das ganze auch auf dem iPad?

Gruß rPano

5

Dienstag, 18. Januar 2011, 14:49

Gibt es hierzu schon etwas neues?

Gruß Ronny

Ähnliche Themen