Sie sind nicht angemeldet.

1

Mittwoch, 30. September 2009, 12:24

Need help for sound plugin

Hello

it is possible to load/stop soundfile depends on scene and continous??

i mean

"if i go from scene1 to scene2 play sound1"
"if i go from scene 2 to scene 3 still play sound1 (not from begiining)"

but

"if i go from scene 1 to scene 4 playsound2"
"if i go from scene 4 to scene 5 continous play sound2 (not from begining)"


i know it can be done via hotspots on click but i have a lot of hotspots on each pano and i want to use other method if possible?



i tried now this way (on each scene)

<scene name="scene1" onstart="action(mutesound1); action(playsound2)">

now is few scenes with sound1 enable and sound2 disable and few scenes with sound2 enable and sound1 disable - is what i want but i need not reloaded mp3 every scene

is possible without every hotspot onclick operations?


also it can be done easy with "grouping" scenes, it is possible? to make "group1 on start" and group1 = scene1, scene2, scene3?


sorry if questions aint smart :) im newbie in this :)

Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »pavka« (30. September 2009, 13:20)


2

Dienstag, 6. Oktober 2009, 11:02

Hi,

yes, that would be possible,

define an action for the sound outside the scenes, and call this action on every scene onstart,
and before calling set a custom variable to the current scene name, and a other variable to the last one,

e.g.

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<scene name="scene1" 
       onstart="set(lastscene,get(currentscene)); set(currentscene,scene1); soundsetup();">
...
</scene>

<scene name="scene2" 
       onstart="set(lastscene,get(currentscene)); set(currentscene,scene2); soundsetup();">
...
</scene>

...

<action name="soundsetup">
  if(lastscene == scene1,
     if(currentscene == scene1, ...);
     if(currentscene == scene2, ...);
    );
  if(lastscene == scene2,
     if(currentscene == scene1, ...);
     if(currentscene == scene2, ...);
    );
</action>


best regards,
Klaus

Ähnliche Themen