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.
Und dann hab ich in der ersten Szene die beiden Sounds eingebunden:
Zitat
<plugin name="soundinterface" url="%SWFPATH%/plugins/soundinterface.swf" keep="true" rootpath="%FIRSTXML%" onloaded="" />
<plugin name="soundinterface2" url="%SWFPATH%/plugins/soundinterface.swf" keep="true" rootpath="%FIRSTXML%" onloaded="" />
Das funktioniert wie gesagt.
Zitat
<!-- play sound playsound3D(id, mp3file, ath, atv, range (wieviel Grad soll die Musik gehen), volume, loops); -->
<plugin name="soundinterface"
onloaded="playsound3D(id1, mp3s/test.mp3, 0, 0, 120, 1.0, 0);"
keep="false"
/>
<plugin name="soundinterface2"
onloaded="playsound3D(id2, mp3s/test2.mp3, 180, 0, 120, 1.0, 0);"
/>
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<plugin name="soundinterface" url="soundinterface.swf" />
<scene name="scene1" onstart="action(startsound);">
<action name="startsound">
playsound3D(id1, mp3s/test.mp3, 0, 0, 120, 1.0, 0);
playsound3D(id2, mp3s/test2.mp3, 180, 0, 120, 1.0, 0);
</action>
... pano ...
</scene>
<scene name="scene2" onstart="action(startsound);">
<action name="startsound">
playsound3D(id1, mp3s/scene2-test.mp3, 0, 0, 120, 1.0, 0);
playsound3D(id2, mp3s/scene2-test2.mp3, 180, 0, 120, 1.0, 0);
</action>
... pano ...
</scene>
|
Wenn ich statt der Action, folgendes einfüge, dann funktionierts noch, also die Pfade stimmen alle, muss irgendwas mit der Action sein
Zitat
<krpano version="1.0.8" onstart="action(start);">
<include url="%SWFPATH%/panotour.xml"/>
<action name="start">
loadscene(scene1,null,NULL);
</action>
<plugin name="soundinterface" url="%SWFPATH%/plugins/soundinterface.swf" keep="true" />
<!-- ------------------------------------------------------- SZENE 1 -->
<scene name="scene1" onstart="action(startsound);">
<view hlookat="195" vlookat="0" fov="90" />
<image type="CUBESTRIP">
<cubestrip url="panos/1.jpg" />
</image>
<plugin name="radar" align="center" heading="30" parent="spot1" />
<plugin name="spotactive" align="center" parent="spot1"/>
<!-- Hotspots -->
<hotspot name="pano2"
url="%SWFPATH%/guibilder/hotspotarrow.swf"
ath="-150"
atv="3"
scale="1"
zoom="true"
onhover="showtext(Zum nächsten Standpunkt);"
onclick="
loadscene(scene2,null,null,BLEND(2));
wait(blend);
oninterrupt(action(lookinterrupt));"
/>
<!-- play sound playsound3D(id, mp3file, ath, atv, range (wieviel Grad soll die Musik gehen), volume, loops); -->
<action name="startsound">
playsound3D(id1, mp3s/test.mp3, 0, 0, 120, 1.0, 0);
playsound3D(id2, mp3s/test2.mp3, 180, 0, 120, 1.0, 0);
</action>
</scene>
</krpano>
Gruß Marc
Zitat
<plugin name="soundinterface" onloaded="playsound3D(id1, mp3s/test.mp3, 0, 0, 120, 1.0, 0);" />
|
|
Quellcode |
1 2 3 4 |
<krpano> ... <plugin name="soundinterface" ... onloaded="action(start);" /> ... |
und folgende Actions, die einmal überprüft, ob der soundoffbtn gerade aktiv ist oder nicht, und je nach dem dann die Actio für Sound on oder Sound off aufruft:
Zitat
<plugin name="soundoffbtn" keep="true" url="%SWFPATH%/guibilder/buttons/btn_soundon.jpg" align="bottom" visible="true" edge="center" y="29" x="+80" blendmode="screen" onhover="showtext(Sound ausschalten);" onover="set(blendmode,add);" onout="set(blendmode,screen);" onclick="set(plugin[soundoffbtn].visible,false);set(plugin[soundonbtn].visible,true);stopallsounds();" zorder="1" />
<plugin name="soundonbtn" keep="true" url="%SWFPATH%/guibilder/buttons/btn_soundoff.jpg" align="bottom" visible="false" edge="center" y="29" x="+80" blendmode="screen" onhover="showtext(Sound einschalten);" onover="set(blendmode,add);" onout="set(blendmode,screen);" onclick="set(plugin[soundonbtn].visible,false);set(plugin[soundoffbtn].visible,true);action(startsound);" zorder="1" />
Kurz getestet und scheint zu funktionieren :-)
Zitat
<!-- play sound playsound3D(id, mp3file, ath, atv, range (wieviel Grad soll die Musik gehen), volume, loops); -->
<action name="startsound">
if(plugin[soundoffbtn].visible == true, action(soundon););
if(plugin[soundoffbtn].visible == false, action(soundoff););
</action>
<action name="soundon">
playsound3D(id1, mp3s/test1.mp3, 113, 0, 250, 0.4, 0);
playsound3D(id2, mp3s/test2.mp3, -45, 0, 160, 1.0, 0);
</action>
<action name="soundoff">
stopallsounds();
</action>