You are not logged in.

esys

Intermediate

  • "esys" started this thread

Posts: 267

Location: Balazé France

Occupation: photographer

  • Send private message

1

Tuesday, October 16th 2012, 3:57pm

global action to stick a sound with a flyin hotspot?

Hello,

I've a virtual tour with several scenes. In each one a picture is displayed through a flyin hotspot, then a sound is played with it. I'd like to use a global action in the flyin code:

Source code

1
2
3
4
5
6
7
	<action name="flyin">
		if(hotspot[%1].flying == 0.0, hotspot[%1].resetsize(); calc_flyout_size(%1); );
		if(hotspot[%1].oldscale === null, copy(hotspot[%1].oldscale, hotspot[%1].scale) );
                ..................................................;
		tween(hotspot[%1].rz, 0.0);
		[b]playaudio();[/b]
	</action>

Then write a playaudio action in each scene with the proper name of the sound:

Source code

1
2
3
4
5
6
7
8
9
10
11
	<action name="playaudio">
			set(plugin[bton_son].visible, true);
			tween(plugin[bton_son].alpha, 1.0, 1.5);
			playsound(rotisserie, %SWFPATH%/audio/rotisserie.mp3, 1);
	</action>
	
	<action name="stopaudio">
			stopsound(rotisserie);
			tween(plugin[bton_son].alpha, 0.0, 1.5);
			delayedcall(1.5, set(plugin[bton_son].visible, false));
	</action>

Problem is that in the next scene, the sound displayed is the same than in the previous one. Any flag to put in the loadscene action, to ignore the previous playaudio(); and read the good one in the next scene?

Thanks for any help. *smile*
Steph.
I
Steph

esys

Intermediate

  • "esys" started this thread

Posts: 267

Location: Balazé France

Occupation: photographer

  • Send private message

2

Tuesday, October 23rd 2012, 8:39pm

Any suggestion?
*cry*

Thanks.
Steph
Steph