Sie sind nicht angemeldet.

1

Freitag, 28. Mai 2010, 15:30

Ambient sound changing for each pano

Hi,

I'm using a combo to switch detween 3 panos.
The first pano has no sound but each 2 others have a different sound .
I can't make it run :

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<krpano version="1.0.8" onstart="action(onstart);" logkey="false" >

<plugin name="soundinterface" url="%SWFPATH%/plugins/soundinterface.swf" rootpath="%CURRENTXML%" />

<plugin name="box_panos" url="%SWFPATH%/plugins/combobox.swf" keep="true" visible="true"
align="rightbottom"
x="10" y="10"
width="200"
onloaded="action(setup_box_panos);"
zorder="99"
/>

<action name="setup_box_panos">
removeall();
additem(first choice without ambient sound, action(loadscene1) );
additem(second choice with sound, action(loadscene2) );
additem(third choice with sound, action(loadscene3) );
</action>

<action name="loadscene1">
stopallsounds();
loadscene(scene1, null, MERGE, BLEND(1));
</action>

<action name="loadscene2">
stopallsounds();
loadscene(scene2, null, MERGE, BLEND(1));
playsound(frogs2,frogs2.mp3,loops);
</action>

<action name="loadscene3">
stopallsounds();
loadscene(scene3, null, MERGE, BLEND(1));
playsound(frogs3,frogs3.mp3,loops);
</action>

<action name="onstart">
loadscene(scene1, null, MERGE, BLEND(1));
plugin[box_panos].selectitem(first choice without ambient sound);
</action>


any idea ?
I have no sound at all !
Where should the play sound be inserted ?

thank's

2

Freitag, 28. Mai 2010, 17:52

Hi Ribouldingue,

Try using keep="true" and preload="true" inside your soundinterface plugin:

Quellcode

1
2
3
4
5
<plugin name="soundinterface"
	url="%SWFPATH%/plugins/soundinterface.swf"
	rootpath="%CURRENTXML%"
	keep="true"
	preload="true"/>
  • keep (NEW - Version 1.0.7 and higher)
    important flag for virtual tour or conntect panoramas!
    possibly values: true or false, default=false
    when keep is set to true the plugin/hotspot is kept when loading other panoramas, otherwise it will be removed
  • MERGE (1.0.7 an higher)
    • merges all settings from the current and the next pano
    • plugins / hotspots / lensflare without keep="true" are removed
    • if there are plugins and hotspots in the new panorama with the same name as the kept ones, the new ones are not loaded
    • this is the recommended setting for new virtual tours
Also, the loops argument inside yours playsound() action is incorrect:
  • 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)
SAlut.

3

Mittwoch, 2. Juni 2010, 18:51

Fast and accurate answer !

that's ok now, I added the keep="true" and preload="true" in the plugin attributes.

thank's